pcb icon indicating copy to clipboard operation
pcb copied to clipboard

Watch mode, caches and plugins

Open NekR opened this issue 7 years ago • 3 comments

In watch mode, on a second and following rebuilds offline-plugin reports it cannot find index.html or in output assets. index.html is being added with html-webpack-plugin. Same happens with assets added by copy-webpack-plugin.

NekR avatar Mar 26 '17 20:03 NekR

I experiences this issue.

In watch mode, when I changed my code, webpack doesn't reload page because of below warning:

[WDS] App updated. Recompiling...
[WDS] Warnings while compiling.
OfflinePlugin: Cache asset [./] is not found in the output assets,if it's an external asset, put it to the |externals| option to remove this warning

But I already add ./ to externals:

new OfflinePlugin({
  caches: {
    main: ['./', 'main.js']
  },
  externals: ['./'],
  ServiceWorker: {
    events: true
  },
  AppCache: false
})

lmk123 avatar May 16 '17 03:05 lmk123

It actually should update even with this issue. It just may not work (offline capabilities).

NekR avatar May 16 '17 04:05 NekR

I ran into this as well, but made it work by changing './' to 'index.html' and moving OfflinePlugin() below HtmlWebpackPlugin() in the plugin list.

dustinlarimer avatar Mar 13 '18 01:03 dustinlarimer