@kiwicom/webpack
v0.3.4
Published
The official Kiwi.com Webpack config.
Downloads
13
Keywords
Readme
@kiwicom/webpack
The official Kiwi.com Webpack config.
Setup
webpack.config.js
const kiwicom = require("@kiwicom/webpack");
const { merge } = require("webpack-merge");
module.exports = (e, argv) => {
const cfg = kiwicom(e, argv);
const production = argv.mode === "production";
const base = {
entry: {
// your entrypoints
},
output: {
// your output
},
};
if (production) {
return merge(cfg, base, {
// ...production
});
}
return merge(cfg, base, {
// ...dev
});
};
package.json
{
"scripts": {
"webpack": "webpack --mode production",
"webpack:dev": "webpack serve --mode development",
"webpack:stats": "webpack --mode production --json > stats.json"
}
}
License
MIT