Add support for "ignore"
mitemitreski opened this issue · comments
At the moment there is no support for ignore mechanism.
If for example I would like to add a .js file with service worker its not possible to do that now without a major hack
Sorry, but I don't fully understand. Could you explain the problem better? Maybe an example project?
Thanks!
Say you have
src/
serviceworker.js
index.js
index.html
…and you don't want serviceworker.js
to be processed by either Babel or Webpack, you just want it to be loaded and move to dist
, it would be nice to have .saguiignore
or something so that this file is not processed.
not necessarily not process it would be cool if it does get minimized and all of the other goodies but does not attempt to inline it in the rest of the scripts since it does need to be a separate file.
Is the libraries feature sufficient?
No, the central issue is that it cannot be made into a UMD or any kind of other module. ServiceWorkers have a different API, with the self
global and all that, and for it to work the script has to be left alone.
This could be a separate lib configuration, one in which the library gets exposed without any kind of module wrapping.
@mitemitreski have you tried:
- https://github.com/NekR/offline-plugin
- https://github.com/oliviertassinari/serviceworker-webpack-plugin
Both can be configured via the additionalwebpackconfig.
Hi @mitemitreski, I'll close this issue for know, given the proposed solutions.
Please let us know if they end-up not being sufficient and we can restart the conversation.
Thanks again for reporting it and using Sagui! ❤️