Skip to content

Uncaught error during development build (with correct hmr setup) #14

@xzilja

Description

@xzilja

I've ensured to set up my webpacks dev config accordingly to account for hot module issues related to the plugin, however I still get error during my dev build:

CodeSplit.js:103 Uncaught Error:

line that it refers to is

100 if (typeof modules === 'function') {
101        // Async modules.
102       if (true) {
>103         throw new Error(HMR_NOT_SUPPORTED);
104        }

My plugin setup includes:

new CodeSplitWebpackPlugin({
   disabled: process.env.NODE_ENV === 'development'
})

and

{
  "presets": ["react-app"],
  "plugins": ["code-split-component/babel"],
  "env": {
    "development": {
      "plugins": [
        ["code-split-component/babel", { "disabled": true }]
      ]
    }
  }
}

As well as I logged out my environment and it is indeed set to development, not sure if this is potential bug or I am missing something obvious? Looking at the networking tab I can see that I'm only including one bundle.js file, so it seems to be loading everything async?

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions