Browse Source

Remove Babel plugin for ES Modules (#2975)

* Remove Babel plugin for ES Modules

Processing of ES Modules is executed by Webpack.
Don't have to do it on Babel side.

* Add plugin for test
closed-social-v3
Yamagishi Kazutoshi 7 years ago
committed by Eugen Rochko
parent
commit
882e4f5322
3 changed files with 9 additions and 11 deletions
  1. +6
    -0
      .babelrc
  2. +2
    -1
      package.json
  3. +1
    -10
      yarn.lock

+ 6
- 0
.babelrc View File

@ -5,6 +5,7 @@
"env", "env",
{ {
"loose": true, "loose": true,
"modules": false,
"targets": { "targets": {
"browsers": ["last 2 versions", "IE >= 11", "iOS >= 9"] "browsers": ["last 2 versions", "IE >= 11", "iOS >= 9"]
} }
@ -33,6 +34,11 @@
"plugins": [ "plugins": [
"lodash" "lodash"
] ]
},
"test": {
"plugins": [
"transform-es2015-modules-commonjs"
]
} }
} }
} }

+ 2
- 1
package.json View File

@ -10,7 +10,7 @@
"storybook": "start-storybook -p 9001 -c storybook", "storybook": "start-storybook -p 9001 -c storybook",
"test": "npm run test:lint && npm run test:mocha", "test": "npm run test:lint && npm run test:mocha",
"test:lint": "eslint -c .eslintrc.yml --ext=js --ext=jsx app/javascript/", "test:lint": "eslint -c .eslintrc.yml --ext=js --ext=jsx app/javascript/",
"test:mocha": "mocha --require ./spec/javascript/setup.js --compilers js:babel-register ./spec/javascript/components/*.test.jsx",
"test:mocha": "NODE_ENV=test mocha --require ./spec/javascript/setup.js --compilers js:babel-register ./spec/javascript/components/*.test.jsx",
"postinstall": "npm rebuild node-sass" "postinstall": "npm rebuild node-sass"
}, },
"repository": { "repository": {
@ -29,6 +29,7 @@
"babel-plugin-react-transform": "^2.0.2", "babel-plugin-react-transform": "^2.0.2",
"babel-plugin-syntax-dynamic-import": "^6.18.0", "babel-plugin-syntax-dynamic-import": "^6.18.0",
"babel-plugin-transform-class-properties": "^6.24.1", "babel-plugin-transform-class-properties": "^6.24.1",
"babel-plugin-transform-es2015-modules-commonjs": "^6.24.1",
"babel-plugin-transform-object-rest-spread": "^6.23.0", "babel-plugin-transform-object-rest-spread": "^6.23.0",
"babel-plugin-transform-react-jsx-self": "^6.22.0", "babel-plugin-transform-react-jsx-self": "^6.22.0",
"babel-plugin-transform-react-jsx-source": "^6.22.0", "babel-plugin-transform-react-jsx-source": "^6.22.0",

+ 1
- 10
yarn.lock View File

@ -718,16 +718,7 @@ babel-plugin-transform-class-properties@6.16.0:
babel-plugin-syntax-class-properties "^6.8.0" babel-plugin-syntax-class-properties "^6.8.0"
babel-runtime "^6.9.1" babel-runtime "^6.9.1"
babel-plugin-transform-class-properties@^6.22.0:
version "6.22.0"
resolved "https://registry.yarnpkg.com/babel-plugin-transform-class-properties/-/babel-plugin-transform-class-properties-6.22.0.tgz#aa78f8134495c7de06c097118ba061844e1dc1d8"
dependencies:
babel-helper-function-name "^6.22.0"
babel-plugin-syntax-class-properties "^6.8.0"
babel-runtime "^6.22.0"
babel-template "^6.22.0"
babel-plugin-transform-class-properties@^6.24.1:
babel-plugin-transform-class-properties@^6.22.0, babel-plugin-transform-class-properties@^6.24.1:
version "6.24.1" version "6.24.1"
resolved "https://registry.yarnpkg.com/babel-plugin-transform-class-properties/-/babel-plugin-transform-class-properties-6.24.1.tgz#6a79763ea61d33d36f37b611aa9def81a81b46ac" resolved "https://registry.yarnpkg.com/babel-plugin-transform-class-properties/-/babel-plugin-transform-class-properties-6.24.1.tgz#6a79763ea61d33d36f37b611aa9def81a81b46ac"
dependencies: dependencies:

Loading…
Cancel
Save