1 thought on “[Webpack 2] Handling `System.import()` invalid chunk errors

  1. @sokra I found nothing according to the spec,

    But I think that as soon as implementation will start we will have some new error in this list

    Currently i’m checking it like that

    System.import('./Component.js').catch((e) => {
      if (process.env.NODE_ENV === 'production') {
        // if error occurred in production - in 99%% cases it's just because of cache 
        // just force reload page and load new chunks
        window.location.reload(true) 
      } else {
         // otherwise log error
        console.error(e)
      }
    })

    It’s good enough for now

Comments are closed.