webpack/benchmark/createBenchmark.js

31 lines
571 B
JavaScript
Raw Normal View History

const webpack = require("../");
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
},
optimization: {
moduleIds: "named"
},
2018-06-13 19:04:23 +08:00
plugins: [
new webpack.IgnorePlugin(/^(fsevents|terser)$/),
2018-06-13 19:04:23 +08:00
new webpack.NormalModuleReplacementPlugin(
/^.\/loadLoader$/,
path.resolve(__dirname, "./createBenchmark/loadLoader")
)
]
},
2018-06-13 19:04:23 +08:00
(err, stats) => {
console.log(stats.toString());
}
);