Skip to content
This repository has been archived by the owner on Jun 26, 2023. It is now read-only.

Commit

Permalink
Add target web to webpack for HMR
Browse files Browse the repository at this point in the history
  • Loading branch information
hyochan committed Nov 3, 2020
1 parent 978d67c commit 8a98ea9
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 8 deletions.
8 changes: 0 additions & 8 deletions src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,3 @@ const renderApp = (): void => {
};

renderApp();

/* eslint-disable */
if ((module as any).hot) {
(module as any).hot.accept(['./components/navigation/SwitchNavigator'], () =>
renderApp(),
);
}
/* eslint-enable */
1 change: 1 addition & 0 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ const { CleanWebpackPlugin } = require('clean-webpack-plugin');

module.exports = {
mode: 'development',
target: 'web',
entry: {
app: './src/App.tsx',
},
Expand Down

0 comments on commit 8a98ea9

Please sign in to comment.