Build: fix hot reload for charts (#9400)

* Fix hot reload for charts

* Override tsc options for plugins

Plugins will sometimes have their own `tsconfig.json`, which will
interfere with the dev server config if configured inappropriately.

This change makes sure `tsc` (and `ts-loader`) always compiles to
`esnext` modules, so we don't get "Uncaught ReferenceError: exports
is not defined" error.
This commit is contained in:
Jianchao Yang
2020-03-30 09:31:46 -07:00
committed by GitHub
parent 752de8fe9d
commit 3d8a2b859e
5 changed files with 23 additions and 2 deletions

View File

@@ -133,7 +133,8 @@ class Chart extends React.Component {
}
}
return false;
// `cacheBusterProp` is nnjected by react-hot-loader
return this.props.cacheBusterProp !== nextProps.cacheBusterProp;
}
componentWillUnmount() {