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

Fix config for frontend production mode

parent 25da372c
...@@ -7,14 +7,14 @@ ...@@ -7,14 +7,14 @@
"lint": "eslint \"./src/**/*.js\"", "lint": "eslint \"./src/**/*.js\"",
"lint-fix": "eslint \"./src/**/*.js\" --fix", "lint-fix": "eslint \"./src/**/*.js\" --fix",
"dev": "node server.js", "dev": "node server.js",
"build": "webpack --mode production", "build": "webpack --config webpack.config.build.js",
"test": "echo \"Error: no test specified\" && exit 1", "test": "echo \"Error: no test specified\" && exit 1",
"stats": "webpack --profile --json > frontend/static/frontend/stats.json", "stats": "webpack --profile --json > frontend/static/frontend/stats.json",
"view-stats": "webpack-bundle-analyzer frontend/static/frontend/stats.json" "view-stats": "webpack-bundle-analyzer frontend/static/frontend/stats.json"
}, },
"repository": { "repository": {
"type": "git", "type": "git",
"url": "git@gitlab.utc.fr:chehabfl/outgoing_rex.git" "url": "git@gitlab.utc.fr:rex-dri/rex-dri.git"
}, },
"author": "", "author": "",
"license": "ISC", "license": "ISC",
......
...@@ -21,6 +21,8 @@ const wrapper = document.getElementById("app"); ...@@ -21,6 +21,8 @@ const wrapper = document.getElementById("app");
wrapper ? ReactDOM.render(<MainReactEntry />, wrapper) : null; wrapper ? ReactDOM.render(<MainReactEntry />, wrapper) : null;
if(module.hot) { // eslint-disable-next-line no-undef
module.hot.accept(); if (module.hot) {
} // eslint-disable-next-line no-undef
\ No newline at end of file module.hot.accept();
}
...@@ -59,7 +59,6 @@ const config = { ...@@ -59,7 +59,6 @@ const config = {
], ],
}, },
plugins: [ plugins: [
// TODO add hash to css files
new MiniCssExtractPlugin({ new MiniCssExtractPlugin({
// Options similar to the same options in webpackOptions.output // Options similar to the same options in webpackOptions.output
// both options are optional // both options are optional
......
const merge = require("webpack-merge"); const merge = require("webpack-merge");
const webpackConfig = require("./webpack.config"); const webpackConfig = require("./webpack.config.base");
module.exports = merge(webpackConfig, { module.exports = merge(webpackConfig, {
devtool: "source-map", devtool: "source-map",
}); mode: "production",
\ No newline at end of file });
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