Skip to content

Commit

Permalink
Add @snowpack/plugin-react-refresh to React scripts (#829)
Browse files Browse the repository at this point in the history
* add react-refresh to react templates

* use greater than or equal

* switch to 16.10.0
  • Loading branch information
stramel committed Aug 17, 2020
1 parent 1e11dfd commit a15ab44
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 2 deletions.
9 changes: 8 additions & 1 deletion packages/@snowpack/app-scripts-react/babel.config.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
{
"presets": [["@babel/preset-react"], "@babel/preset-typescript"],
"plugins": ["@babel/plugin-syntax-import-meta"]
"plugins": ["@babel/plugin-syntax-import-meta"],
"env": {
"development": {
"plugins": [
"react-refresh/babel"
]
}
}
}
1 change: 1 addition & 0 deletions packages/@snowpack/app-scripts-react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
"@babel/preset-typescript": "^7.10.4",
"@snowpack/plugin-babel": "^2.0.3",
"@snowpack/plugin-dotenv": "^2.0.0",
"@snowpack/plugin-react-refresh": "^2.0.2",
"babel-jest": "^26.2.2",
"babel-preset-react-app": "^9.1.2",
"react-app-polyfill": "^1.0.6"
Expand Down
2 changes: 1 addition & 1 deletion packages/@snowpack/app-scripts-react/snowpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ module.exports = {
public: '/',
src: '/_dist_',
},
plugins: ['@snowpack/plugin-babel', '@snowpack/plugin-dotenv'],
plugins: ['@snowpack/plugin-react-refresh', '@snowpack/plugin-babel', '@snowpack/plugin-dotenv'],
devOptions: {},
installOptions: {
installTypes: isTS,
Expand Down
4 changes: 4 additions & 0 deletions packages/@snowpack/plugin-react-refresh/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,9 @@
"dependencies": {
"react-refresh": "^0.8.3"
},
"peerDependencies": {
"react": ">=16.10.0",
"react-dom": ">=16.10.0"
},
"gitHead": "a01616bb0787d56cd782f94cecf2daa12c7594e4"
}

1 comment on commit a15ab44

@vercel
Copy link

@vercel vercel bot commented on a15ab44 Aug 17, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.