Commit 43dfe4bc authored by Florent Chehab's avatar Florent Chehab

Fix config for frontend production mode

parent 25da372c
Pipeline #34848 passed with stages
in 3 minutes and 55 seconds
......@@ -7,14 +7,14 @@
"lint": "eslint \"./src/**/*.js\"",
"lint-fix": "eslint \"./src/**/*.js\" --fix",
"dev": "node server.js",
"build": "webpack --mode production",
"build": "webpack --config webpack.config.build.js",
"test": "echo \"Error: no test specified\" && exit 1",
"stats": "webpack --profile --json > frontend/static/frontend/stats.json",
"view-stats": "webpack-bundle-analyzer frontend/static/frontend/stats.json"
},
"repository": {
"type": "git",
"url": "git@gitlab.utc.fr:chehabfl/outgoing_rex.git"
"url": "git@gitlab.utc.fr:rex-dri/rex-dri.git"
},
"author": "",
"license": "ISC",
......
......@@ -21,6 +21,8 @@ const wrapper = document.getElementById("app");
wrapper ? ReactDOM.render(<MainReactEntry />, wrapper) : null;
if(module.hot) {
module.hot.accept();
}
\ No newline at end of file
// eslint-disable-next-line no-undef
if (module.hot) {
// eslint-disable-next-line no-undef
module.hot.accept();
}
......@@ -59,7 +59,6 @@ const config = {
],
},
plugins: [
// TODO add hash to css files
new MiniCssExtractPlugin({
// Options similar to the same options in webpackOptions.output
// both options are optional
......
const merge = require("webpack-merge");
const webpackConfig = require("./webpack.config");
const webpackConfig = require("./webpack.config.base");
module.exports = merge(webpackConfig, {
devtool: "source-map",
});
\ No newline at end of file
mode: "production",
});
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment