Skip to content

Commit e8bea90

Browse files
authored
Merge pull request #174 from garthenweb/fix/parcel-ssr-example
docs: update parcel example to make it work with modern babel/parcel
2 parents 07a4d93 + 185176e commit e8bea90

File tree

3 files changed

+2712
-4071
lines changed

3 files changed

+2712
-4071
lines changed
Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11
{
2-
"presets": [
3-
"env",
4-
"react"
2+
"presets": ["@babel/preset-env", "@babel/preset-react"],
3+
"plugins": [
4+
"react-imported-component/babel",
5+
"@babel/plugin-proposal-dynamic-import",
6+
"@babel/plugin-transform-modules-commonjs"
57
],
6-
"plugins": ["react-imported-component/babel"],
78
"env": {
8-
"server": {
9-
},
109
"client": {
11-
"plugins": ["react-hot-loader/babel"]
10+
"plugins": [
11+
"react-hot-loader/babel"
12+
]
1213
}
1314
}
14-
}
15+
}

examples/SSR/parcel-react-ssr/package.json

Lines changed: 19 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -26,28 +26,29 @@
2626
"react-dom": "./node_modules/react-dom"
2727
},
2828
"dependencies": {
29-
"cheerio": "^1.0.0-rc.2",
30-
"compression": "^1.7.2",
31-
"express": "^4.16.2",
29+
"cheerio": "^1.0.0-rc.3",
30+
"compression": "^1.7.4",
31+
"express": "^4.17.1",
3232
"multistream": "^4.0.0",
3333
"parcel-plugin-bundle-manifest": "^0.2.0",
34-
"react": "^16.9.0",
35-
"react-dom": "^16.9.0",
36-
"react-helmet": "^5.2.0",
37-
"react-imported-component": "^6.1.1",
34+
"react": "^16.12.0",
35+
"react-dom": "^16.12.0",
36+
"react-helmet": "^5.2.1",
37+
"react-imported-component": "^6.2.1",
3838
"react-router-dom": "^4.2.2",
39-
"used-styles": "^2.0.2"
39+
"used-styles": "^1.1.0"
4040
},
4141
"devDependencies": {
42-
"babel-cli": "^6.26.0",
43-
"babel-core": "^6.26.3",
44-
"babel-plugin-dynamic-import-node": "^1.2.0",
45-
"babel-preset-env": "^1.7.0",
46-
"babel-preset-react": "^6.24.1",
47-
"cross-env": "^6.0.0",
48-
"node-sass": "^4.11.0",
49-
"parcel-bundler": "^1.11.0",
50-
"react-hot-loader": "^4.0.0",
51-
"rimraf": "^3.0.0"
42+
"@babel/cli": "^7.8.4",
43+
"@babel/core": "^7.8.4",
44+
"@babel/plugin-proposal-dynamic-import": "^7.8.3",
45+
"@babel/plugin-transform-modules-commonjs": "^7.8.3",
46+
"@babel/preset-env": "7.8.4",
47+
"@babel/preset-react": "7.8.3",
48+
"cross-env": "^7.0.0",
49+
"node-sass": "^4.13.1",
50+
"parcel-bundler": "^1.12.4",
51+
"react-hot-loader": "^4.12.19",
52+
"rimraf": "^3.0.2"
5253
}
5354
}

0 commit comments

Comments
 (0)