-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathwebpack.serve.js
51 lines (44 loc) · 1.22 KB
/
webpack.serve.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
42
43
44
45
46
47
48
49
50
51
/* eslint-env node */
const path = require("path");
const config = require("./webpack.build");
config.plugins = []; // reset
const app = process.env.APP || "editron";
// LOCAL
// config.entry["index.html"] = path.join(__dirname, "test", "support", "local-setup.html");
// config.entry["editron.css"] = path.join(__dirname, "editron.scss");
// app/array
config.entry["editron"] = path.join(__dirname, "app", app, "index.ts");
config.module.rules.push({
test: [/wysiwyg-editor.scss/, /editron.scss$/],
use: [
"file-loader?name=[name].css",
"extract-loader",
"css-loader",
{
loader: "sass-loader",
options: {
sassOptions: {
includePaths: [path.join(__dirname, "node_modules")]
}
}
}
]
});
config.module.rules.push(
{
test: /.*\.scss$/,
use: [
"style-loader",
"css-loader",
{
loader: "sass-loader",
options: {
sassOptions: {
includePaths: [path.join(__dirname, "node_modules")]
}
}
}
]
},
);
module.exports = config;