-
Notifications
You must be signed in to change notification settings - Fork 0
/
esbuild.config.js
41 lines (40 loc) · 1.27 KB
/
esbuild.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
const esbuild = require('esbuild');
const { copy } = require('esbuild-plugin-copy');
const { globPlugin } = require('esbuild-plugin-glob');
const { sassPlugin } = require("esbuild-sass-plugin");
const { createImporter } = require("sass-extended-importer");
esbuild.build({
entryPoints : [
"src/js/*.js",
"src/styles/[a-zA-Z]*.scss",
],
bundle : true,
minify : false,
// sourcemap : true,
// metafile : true,
// watch : true,
// incremental : true,
outdir : 'dist/assets/',
external : ["jquery", "what-input"],
plugins : [
globPlugin(),
// Sass includes
sassPlugin({
loadPaths: [
"node_modules/foundation-sites/scss/",
"node_modules/motion-ui/src/",
],
importer: createImporter(),
}),
// Copy in the static external libraries
// https://github.com/LinbuduLab/esbuild-plugins/issues/105
copy({ assets: {
from : "node_modules/jquery/dist/jquery.min.js",
to : "js/vendor"
}}),
copy({ assets: {
from : "node_modules/what-input/dist/what-input.min.js",
to : "js/vendor"
}}),
],
});