Skip to content

Commit 6e105bb

Browse files
sthzggajus
authored andcommitted
fix: update build command and dependencies (gajus#210)
* fix: update build command and dependencies This commit updates the presets and plugins used in the build-helper run script to use equivalent v7-packages from the @babel namespace. * fix: update demo deps and config Fixes gajus#204
1 parent 10621ef commit 6e105bb

File tree

3 files changed

+10
-8
lines changed

3 files changed

+10
-8
lines changed

demo/package.json

+5-5
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,14 @@
77
"babel-plugin-react-css-modules": "^2.1.3",
88
"react": "^15.4.1",
99
"react-dom": "^15.4.1",
10-
"webpack": "^2.2.0-rc.3"
10+
"webpack": "^2.7.0"
1111
},
1212
"devDependencies": {
13-
"@babel/core": "^6.21.0",
14-
"@babel/loader": "^6.2.10",
15-
"@babel/plugin-transform-react-jsx": "^6.8.0",
13+
"@babel/core": "^7.1.6",
14+
"@babel/plugin-transform-react-jsx": "^7.1.6",
15+
"babel-loader": "^8.0.4",
1616
"css-loader": "^0.26.1",
1717
"style-loader": "^0.13.1",
18-
"webpack-dev-server": "^2.2.0-rc.0"
18+
"webpack-dev-server": "^2.11.3"
1919
}
2020
}

demo/webpack.config.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@ module.exports = {
1818
},
1919
{
2020
include: path.resolve(__dirname, './src'),
21-
loader: '@babel/loader',
21+
loader: 'babel-loader',
2222
query: {
2323
plugins: [
24-
'transform-react-jsx',
24+
'@babel/transform-react-jsx',
2525
[
2626
'react-css-modules',
2727
{

package.json

+3-1
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,11 @@
2424
"@babel/core": "^7.0.0",
2525
"@babel/helper-plugin-test-runner": "^7.0.0",
2626
"@babel/plugin-transform-flow-strip-types": "^7.0.0",
27+
"@babel/plugin-transform-modules-commonjs": "^7.1.0",
2728
"@babel/preset-env": "^7.0.0",
2829
"@babel/register": "^7.0.0",
2930
"babel-core": "^7.0.0-bridge.0",
31+
"babel-jest": "^23.6.0",
3032
"babel-plugin-tester": "^5.5.1",
3133
"eslint": "^5.5.0",
3234
"eslint-config-canonical": "^12.0.0",
@@ -66,7 +68,7 @@
6668
},
6769
"scripts": {
6870
"build": "rm -fr ./dist && NODE_ENV=production babel ./src --out-dir ./dist --source-maps --copy-files && npm run build-helper",
69-
"build-helper": "mkdir -p ./dist/browser && NODE_ENV=production babel ./src/getClassName.js --out-file ./dist/browser/getClassName.js --source-maps --no-babelrc --plugins transform-es2015-modules-commonjs,transform-flow-strip-types --presets es2015",
71+
"build-helper": "mkdir -p ./dist/browser && NODE_ENV=production babel ./src/getClassName.js --out-file ./dist/browser/getClassName.js --source-maps --no-babelrc --plugins @babel/plugin-transform-modules-commonjs,@babel/plugin-transform-flow-strip-types --presets @babel/preset-env",
7072
"lint": "eslint ./src && flow",
7173
"test": "jest"
7274
},

0 commit comments

Comments
 (0)