-
Notifications
You must be signed in to change notification settings - Fork 1
/
webpack.config.js
34 lines (29 loc) · 1.02 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
process.traceDeprecation = true;
const mf_config = require("@patternslib/dev/webpack/webpack.mf");
const package_json = require("./package.json");
const path = require("path");
const patternslib_config = require("@patternslib/dev/webpack/webpack.config.js");
const patternslib_package_json = require("@patternslib/patternslib/package.json");
module.exports = async (env, argv) => {
let config = {
entry: {
"bundle.min": path.resolve(__dirname, "index.js"),
},
};
config = patternslib_config(env, argv, config);
config.output.path = path.resolve(__dirname, "dist/");
config.plugins.push(
mf_config({
name: package_json.name,
remote_entry: config.entry["bundle.min"],
dependencies: {
...patternslib_package_json.dependencies,
...package_json.dependencies,
},
})
);
if (process.env.NODE_ENV === "development") {
config.devServer.static.directory = __dirname;
}
return config;
};