Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Julien Jerphanion
Rex Dri
Commits
43dfe4bc
Commit
43dfe4bc
authored
Feb 10, 2019
by
Florent Chehab
Browse files
Fix config for frontend production mode
parent
25da372c
Changes
4
Hide whitespace changes
Inline
Side-by-side
frontend/package.json
View file @
43dfe4bc
...
...
@@ -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"
,
...
...
frontend/src/index.js
View file @
43dfe4bc
...
...
@@ -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
();
}
frontend/webpack.config.base.js
View file @
43dfe4bc
...
...
@@ -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
...
...
frontend/webpack.config.build.js
View file @
43dfe4bc
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
"
,
});
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment