2018-06-14 16:09:39 +08:00
|
|
|
const webpack = require("../");
|
2017-06-23 20:56:02 +08:00
|
|
|
const path = require("path");
|
|
|
|
|
2018-06-13 19:04:23 +08:00
|
|
|
webpack(
|
|
|
|
{
|
|
|
|
context: __dirname,
|
|
|
|
entry: "./createBenchmark/entry.js",
|
|
|
|
output: {
|
|
|
|
path: __dirname,
|
|
|
|
filename: "benchmark-bundle.js"
|
|
|
|
},
|
|
|
|
target: "node",
|
|
|
|
node: {
|
|
|
|
__dirname: false
|
|
|
|
},
|
2018-09-03 19:55:05 +08:00
|
|
|
optimization: {
|
|
|
|
moduleIds: "named"
|
|
|
|
},
|
2018-06-13 19:04:23 +08:00
|
|
|
plugins: [
|
2018-09-10 07:16:35 +08:00
|
|
|
new webpack.IgnorePlugin(/^(fsevents|terser)$/),
|
2018-06-13 19:04:23 +08:00
|
|
|
new webpack.NormalModuleReplacementPlugin(
|
|
|
|
/^.\/loadLoader$/,
|
|
|
|
path.resolve(__dirname, "./createBenchmark/loadLoader")
|
|
|
|
)
|
|
|
|
]
|
2017-06-23 20:56:02 +08:00
|
|
|
},
|
2018-06-13 19:04:23 +08:00
|
|
|
(err, stats) => {
|
|
|
|
console.log(stats.toString());
|
|
|
|
}
|
|
|
|
);
|