Skip to content

Commit 6165815

Browse files
authored
fix: restore hmr for rns (#178)
* chore(react): Remove warning about CopyWebpackPlugin * fix: Update @nativescript/webpack version
1 parent a870002 commit 6165815

File tree

2 files changed

+2
-8
lines changed

2 files changed

+2
-8
lines changed

packages/template-blank-react/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@nativescript/template-blank-react",
3-
"version": "7.0.8",
3+
"version": "7.0.9",
44
"description": "Blank template for NativeScript apps using React.",
55
"author": "Jamie Birch <14055146+shirakaba@users.noreply.github.com>",
66
"main": "app.js",
@@ -39,7 +39,7 @@
3939
"devDependencies": {
4040
"@babel/core": "^7.4.5",
4141
"@nativescript/types": "^7.0.4",
42-
"@nativescript/webpack": "~3.0.0",
42+
"@nativescript/webpack": "^4.0.0",
4343
"@pmmmwh/react-refresh-webpack-plugin": "^0.4.0-beta.5",
4444
"@types/react": "16.9.34",
4545
"babel-loader": "8.0.6",

packages/template-blank-react/webpack.config.js

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -67,12 +67,6 @@ module.exports = (env) => {
6767
);
6868

6969
if(hmr && !production){
70-
console.warn(
71-
`[webpack.config.js] Warning: You have enabled HMR. However, as of the NativeScript 7 template updates, it ` +
72-
`is broken, due to an issue in CopyWebpackPlugin. Please follow the instructions in this issue thread to roll ` +
73-
`back CopyWebpackPlugin to v4.6.0 and restore HMR: https://github.com/shirakaba/react-nativescript/issues/65\n` +
74-
`... After that, feel free to delete this warning from webpack.config.js!`
75-
);
7670
baseConfig.plugins.push(new ReactRefreshWebpackPlugin({
7771
/**
7872
* Maybe one day we'll implement an Error Overlay, but the work involved is too daunting for now.

0 commit comments

Comments
 (0)