-
Notifications
You must be signed in to change notification settings - Fork 196
Closed
Description
Hey, thanks for the awesome package, it's helping a lot.
I'm using it with the following and 2 thirds of the time when I do a change on the code, I have this error, and nothing loads:
Error on Safari:
TypeError: undefined is not an object (evaluating '__webpack_require__.$Refresh$.runtime = __webpack_require__(/*! ./node_modules/react-refresh/runtime.js */ "./node_modules/react-refresh/runtime.js")')
Error on Chrome:
Uncaught TypeError: Cannot set properties of undefined (setting 'runtime')
The configuration:
webpack: 5.59.1
webpack-cli: 4.9.1
webpack-dev-server 4.3.1
@pmmmwh/react-refresh-webpack-plugin: 0.5.1
react: 17.0.2
react-dom: 17.0.2
react-refresh: 0.10.0
The webpack config:
{
mode: 'development',
devtool: 'inline-source-map',
cache: {
type: 'filesystem',
allowCollectingMemory: true,
},
devServer: {
static: './dist',
hot: true,
allowedHosts: ['site.local'],
port: 81,
headers: {
'Access-Control-Allow-Origin': '*',
},
},
module: {
rules: [
{
test: /\.[jt]sx?$/,
exclude: /node_modules/,
use: [
{
loader: require.resolve('ts-loader'),
options: {
getCustomTransformers: () => ({
before: [ReactRefreshTypeScript()].filter(Boolean),
}),
transpileOnly: true,
},
},
],
},
],
},
plugins: [
new ReactRefreshWebpackPlugin(),
new ForkTsCheckerWebpackPlugin({
eslint: {
files: './src/**/*.{ts,tsx,js,jsx}', // required - same as command `eslint ./src/**/*.{ts,tsx,js,jsx} --ext .ts,.tsx,.js,.jsx`
},
}),
],
}
I'm happy to debug this if guided as I'm not familiar with this.
Metadata
Metadata
Assignees
Labels
No labels