Skip to content
This repository has been archived by the owner on Jul 28, 2020. It is now read-only.

Commit

Permalink
Optimizar build y React para producción
Browse files Browse the repository at this point in the history
  • Loading branch information
sergiodxa committed Nov 14, 2016
1 parent 0880044 commit a7bc644
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 3 deletions.
6 changes: 6 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,13 @@
"babel-loader": "6.2.7",
"babel-plugin-transform-es2015-modules-commonjs": "6.18.0",
"babel-plugin-transform-es2015-template-literals": "6.8.0",
"babel-plugin-transform-minify-booleans": "6.8.0",
"babel-plugin-transform-react-constant-elements": "6.9.1",
"babel-plugin-transform-react-inline-elements": "6.8.0",
"babel-plugin-transform-remove-console": "6.8.0",
"babel-plugin-transform-remove-debugger": "6.8.0",
"babel-plugin-transform-runtime": "6.15.0",
"babel-plugin-transform-undefined-to-void": "6.8.0",
"babel-preset-es2015": "6.18.0",
"babel-preset-es2016": "6.16.0",
"babel-preset-es2017": "6.16.0",
Expand Down
11 changes: 10 additions & 1 deletion webpack/webpack.client.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,16 @@ const config = {
presets: ['es2016', 'es2017', 'react'],
env: {
production: {
plugins: ['transform-regenerator', 'transform-runtime'],
plugins: [
'transform-regenerator',
'transform-runtime',
'transform-react-constant-elements',
'transform-react-inline-elements',
'transform-minify-booleans',
'transform-remove-console',
'transform-remove-debugger',
'transform-undefined-to-void',
],
presets: ['es2015'],
},
development: {
Expand Down
13 changes: 11 additions & 2 deletions webpack/webpack.server.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,19 @@ const config = {
loader: 'babel',
exclude: /(node_modules)/,
query: {
presets: ['latest-minimal', 'react'],
presets: ['react'],
env: {
production: {
plugins: ['transform-regenerator', 'transform-runtime'],
plugins: [
'transform-regenerator',
'transform-runtime',
'transform-react-constant-elements',
'transform-react-inline-elements',
'transform-minify-booleans',
'transform-remove-console',
'transform-remove-debugger',
'transform-undefined-to-void',
],
presets: ['es2015'],
},
development: {
Expand Down

0 comments on commit a7bc644

Please sign in to comment.