Skip to content

Commit

Permalink
Use babel react optimization plugins for production instead of develo…
Browse files Browse the repository at this point in the history
…pment

closes kriasoft#1448
  • Loading branch information
frenzzy committed Oct 25, 2017
1 parent 055e66a commit 248c919
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 46 deletions.
12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,19 +27,19 @@
"passport-facebook": "^2.1.1",
"pretty-error": "^2.1.1",
"prop-types": "^15.6.0",
"query-string": "^5.0.0",
"query-string": "^5.0.1",
"react": "^16.0.0",
"react-dom": "^16.0.0",
"sequelize": "^4.15.0",
"sequelize": "^4.17.2",
"serialize-javascript": "^1.3.0",
"source-map-support": "^0.5.0",
"sqlite3": "^3.1.8",
"universal-router": "^4.2.1",
"universal-router": "^4.3.0",
"whatwg-fetch": "^2.0.3"
},
"devDependencies": {
"assets-webpack-plugin": "^3.5.1",
"autoprefixer": "^7.1.5",
"autoprefixer": "^7.1.6",
"babel-core": "7.0.0-beta.3",
"babel-eslint": "^8.0.1",
"babel-jest": "^21.2.0",
Expand All @@ -63,7 +63,7 @@
"eslint-loader": "^1.9.0",
"eslint-plugin-css-modules": "^2.7.5",
"eslint-plugin-flowtype": "^2.39.1",
"eslint-plugin-import": "^2.7.0",
"eslint-plugin-import": "^2.8.0",
"eslint-plugin-jsx-a11y": "^6.0.2",
"eslint-plugin-prettier": "^2.3.1",
"eslint-plugin-react": "^7.4.0",
Expand Down Expand Up @@ -106,7 +106,7 @@
"stylelint": "^8.2.0",
"stylelint-config-standard": "^17.0.0",
"stylelint-order": "^0.7.0",
"svg-url-loader": "^2.2.0",
"svg-url-loader": "^2.2.1",
"url-loader": "^0.6.2",
"webpack": "^3.8.1",
"webpack-bundle-analyzer": "^2.9.0",
Expand Down
6 changes: 3 additions & 3 deletions tools/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,13 +106,13 @@ const config = {
plugins: [
// Treat React JSX elements as value types and hoist them to the highest scope
// https://github.com/babel/babel/tree/master/packages/babel-plugin-transform-react-constant-elements
...(isDebug ? ['transform-react-constant-elements'] : []),
...(isDebug ? [] : ['transform-react-constant-elements']),
// Replaces the React.createElement function with one that is more optimized for production
// https://github.com/babel/babel/tree/master/packages/babel-plugin-transform-react-inline-elements
...(isDebug ? ['transform-react-inline-elements'] : []),
...(isDebug ? [] : ['transform-react-inline-elements']),
// Remove unnecessary React propTypes from the production build
// https://github.com/oliviertassinari/babel-plugin-transform-react-remove-prop-types
...(isDebug ? ['transform-react-remove-prop-types'] : []),
...(isDebug ? [] : ['transform-react-remove-prop-types']),
],
},
},
Expand Down
72 changes: 35 additions & 37 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -377,12 +377,12 @@ autoprefixer@^7.1.2:
postcss "^6.0.6"
postcss-value-parser "^3.2.3"

autoprefixer@^7.1.5:
version "7.1.5"
resolved "https://registry.yarnpkg.com/autoprefixer/-/autoprefixer-7.1.5.tgz#d65d14b83c7cd1dd7bc801daa00557addf5a06b2"
autoprefixer@^7.1.6:
version "7.1.6"
resolved "https://registry.yarnpkg.com/autoprefixer/-/autoprefixer-7.1.6.tgz#fb933039f74af74a83e71225ce78d9fd58ba84d7"
dependencies:
browserslist "^2.5.0"
caniuse-lite "^1.0.30000744"
browserslist "^2.5.1"
caniuse-lite "^1.0.30000748"
normalize-range "^0.1.2"
num2fraction "^1.2.2"
postcss "^6.0.13"
Expand Down Expand Up @@ -2110,7 +2110,7 @@ browserslist@^2.4.0:
caniuse-lite "^1.0.30000718"
electron-to-chromium "^1.3.18"

browserslist@^2.5.0:
browserslist@^2.5.1:
version "2.5.1"
resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-2.5.1.tgz#68e4bc536bbcc6086d62843a2ffccea8396821c6"
dependencies:
Expand Down Expand Up @@ -2225,6 +2225,10 @@ caniuse-lite@^1.0.30000744:
version "1.0.30000746"
resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30000746.tgz#c64f95a3925cfd30207a308ed76c1ae96ea09ea0"

caniuse-lite@^1.0.30000748:
version "1.0.30000750"
resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30000750.tgz#38ad19aa4c6d88da38e8900d3666b4e3bbb65c22"

caseless@~0.12.0:
version "0.12.0"
resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.12.0.tgz#1b681c21ff84033c826543090689420d187151dc"
Expand Down Expand Up @@ -3380,9 +3384,9 @@ eslint-plugin-flowtype@^2.39.1:
dependencies:
lodash "^4.15.0"

eslint-plugin-import@^2.7.0:
version "2.7.0"
resolved "https://registry.yarnpkg.com/eslint-plugin-import/-/eslint-plugin-import-2.7.0.tgz#21de33380b9efb55f5ef6d2e210ec0e07e7fa69f"
eslint-plugin-import@^2.8.0:
version "2.8.0"
resolved "https://registry.yarnpkg.com/eslint-plugin-import/-/eslint-plugin-import-2.8.0.tgz#fa1b6ef31fcb3c501c09859c1b86f1fc5b986894"
dependencies:
builtin-modules "^1.1.1"
contains-path "^0.1.0"
Expand Down Expand Up @@ -3822,13 +3826,7 @@ file-entry-cache@^2.0.0:
flat-cache "^1.2.1"
object-assign "^4.0.1"

[email protected]:
version "0.11.2"
resolved "https://registry.yarnpkg.com/file-loader/-/file-loader-0.11.2.tgz#4ff1df28af38719a6098093b88c82c71d1794a34"
dependencies:
loader-utils "^1.0.2"

file-loader@^1.1.5:
[email protected], file-loader@^1.1.5:
version "1.1.5"
resolved "https://registry.yarnpkg.com/file-loader/-/file-loader-1.1.5.tgz#91c25b6b6fbe56dae99f10a425fd64933b5c9daa"
dependencies:
Expand Down Expand Up @@ -6580,9 +6578,9 @@ [email protected]:
version "0.1.7"
resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-0.1.7.tgz#df604178005f522f15eb4490e7247a1bfaa67f8c"

path-to-regexp@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-2.0.0.tgz#b77a8168c2e78bc31f3d312d71b1ace97df23870"
path-to-regexp@^2.1.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-2.1.0.tgz#7e30f9f5b134bd6a28ffc2e3ef1e47075ac5259b"

path-type@^1.0.0:
version "1.1.0"
Expand Down Expand Up @@ -7248,9 +7246,9 @@ query-string@^4.1.0:
object-assign "^4.1.0"
strict-uri-encode "^1.0.0"

query-string@^5.0.0:
version "5.0.0"
resolved "https://registry.yarnpkg.com/query-string/-/query-string-5.0.0.tgz#fbdf7004b4d2aff792f9871981b7a2794f555947"
query-string@^5.0.1:
version "5.0.1"
resolved "https://registry.yarnpkg.com/query-string/-/query-string-5.0.1.tgz#6e2b86fe0e08aef682ecbe86e85834765402bd88"
dependencies:
decode-uri-component "^0.2.0"
object-assign "^4.1.0"
Expand Down Expand Up @@ -7952,9 +7950,9 @@ [email protected]:
range-parser "~1.2.0"
statuses "~1.3.1"

sequelize@^4.15.0:
version "4.15.0"
resolved "https://registry.yarnpkg.com/sequelize/-/sequelize-4.15.0.tgz#110e79f67c3a44098517fcbcf030c5ce6f89cf14"
sequelize@^4.17.2:
version "4.17.2"
resolved "https://registry.yarnpkg.com/sequelize/-/sequelize-4.17.2.tgz#c2f725087c3101f60c8caca952e6f5dbd5527bb7"
dependencies:
bluebird "^3.4.6"
cls-bluebird "^2.0.1"
Expand All @@ -7971,7 +7969,7 @@ sequelize@^4.15.0:
terraformer-wkt-parser "^1.1.2"
toposort-class "^1.0.1"
uuid "^3.0.0"
validator "^8.0.0"
validator "^9.1.0"
wkx "^0.4.1"

serialize-javascript@^1.3.0:
Expand Down Expand Up @@ -8510,11 +8508,11 @@ svg-tags@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/svg-tags/-/svg-tags-1.0.0.tgz#58f71cee3bd519b59d4b2a843b6c7de64ac04764"

svg-url-loader@^2.2.0:
version "2.2.0"
resolved "https://registry.yarnpkg.com/svg-url-loader/-/svg-url-loader-2.2.0.tgz#107e02a3e5127c23e5a0a76ba32392df39f5ad98"
svg-url-loader@^2.2.1:
version "2.2.1"
resolved "https://registry.yarnpkg.com/svg-url-loader/-/svg-url-loader-2.2.1.tgz#2ad8dc8d38652e4e21d579ed3ffc3d7d4091568d"
dependencies:
file-loader "0.11.2"
file-loader "1.1.5"
loader-utils "1.1.0"

svgo@^0.7.0:
Expand Down Expand Up @@ -8822,11 +8820,11 @@ uniqs@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/uniqs/-/uniqs-2.0.0.tgz#ffede4b36b25290696e6e165d4a59edb998e6b02"

universal-router@^4.2.1:
version "4.2.1"
resolved "https://registry.yarnpkg.com/universal-router/-/universal-router-4.2.1.tgz#128c105abad66f35b20763731b4dd6ca911c193f"
universal-router@^4.3.0:
version "4.3.0"
resolved "https://registry.yarnpkg.com/universal-router/-/universal-router-4.3.0.tgz#14db92176a9f39cf6d557d6d250c0508c570b416"
dependencies:
path-to-regexp "^2.0.0"
path-to-regexp "^2.1.0"

universalify@^0.1.0:
version "0.1.1"
Expand Down Expand Up @@ -8912,9 +8910,9 @@ validate-npm-package-license@^3.0.1:
spdx-correct "~1.0.0"
spdx-expression-parse "~1.0.0"

validator@^8.0.0:
version "8.0.0"
resolved "https://registry.yarnpkg.com/validator/-/validator-8.0.0.tgz#00d6ec230ab5d3353ab1174162a96462b947bdbd"
validator@^9.1.0:
version "9.1.1"
resolved "https://registry.yarnpkg.com/validator/-/validator-9.1.1.tgz#3bdd1065cbd28f9d96ac806dee01030d32fd97ef"

value-equal@^0.4.0:
version "0.4.0"
Expand Down

0 comments on commit 248c919

Please sign in to comment.