-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathwebpack.config.js
45 lines (43 loc) · 1.27 KB
/
webpack.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
42
43
44
45
const path = require("path");
const env = require("@next2d/env");
const ESLintPlugin = require("eslint-webpack-plugin");
const Next2DWebpackAutoLoaderPlugin = require("@next2d/webpack-auto-loader-plugin");
module.exports = {
"mode": "development",
"entry": "./src/index.js",
"watchOptions": {
"ignored": [
path.resolve(__dirname, "src/config/Config.js"),
path.resolve(__dirname, "src/Packages.js")
]
},
"output": {
"filename": "app.js",
"path": env() === "local"
? path.join(__dirname, "/dist")
: path.join(__dirname, "/docs/assets/js/")
},
"module": {
"rules": [{
"test": /\.(png|svg|jpg|jpeg|gif)$/i,
"type": "asset/inline"
}]
},
"plugins": [
// If you use eslint, please uncomment it.
new ESLintPlugin({
"fix": true
}),
new Next2DWebpackAutoLoaderPlugin(env(), { "LICENSE": false })
],
"devServer": {
"static": [
{ "directory": path.join(__dirname, "/dist") },
{ "directory": path.join(__dirname, "/mock") }
],
"watchFiles": "src/config/*.json",
"historyApiFallback": true,
"compress": false,
"open": true
}
};