webpack-react-web-extension-template icon indicating copy to clipboard operation
webpack-react-web-extension-template copied to clipboard

Update template with new features

Open OlegWock opened this issue 2 years ago • 1 comments

This template is still works well for me, but there were couple of neat features I added to particular project configs which I'd like to backport here:

  • Ditch prettier
  • Remove fixed list of chunks (ui and others) and let Webpack decide which chunks will be optimal
  • Create custom setup/plugin so webpack will be able to automatically load them. This should take into account current context
    • Extension page (incl. popup)
    • Background page
    • Background worker
    • Content script
  • This should allow us to utilize dynamic/lazy import too
  • Include library/utility for type-safe messaging

OlegWock avatar Jul 29 '23 15:07 OlegWock

Might be useful to detect current context

https://github.com/fregante/webext-detect-page

OlegWock avatar Aug 03 '23 15:08 OlegWock