InjectManifest globPatterns issue
See original GitHub issueWelcome! Please use this template for reporting bugs or requesting features. For questions about using Workbox, the best place to ask is Stack Overflow, tagged with [workbox]
: https://stackoverflow.com/questions/ask?tags=workbox
Library Affected: workbox-build
Browser & Platform: “all browsers”.*
Issue or Feature Request Description: I am developping an app based on the open-wc set-up. Build tool is rollup and workbox settings are overriden using this setup:Overriding the workbox config.
Workbox.config.js: `const path = require(‘path’);
module.exports = { swDest: path.join(__dirname, ‘dist’, ‘sw.js’), swSrc: path.join(__dirname, ‘sw.js’), globDirectory: path.join(__dirname, ‘dist’), globPatterns: [‘**/*.{html,js,json,jpeg, png}’], };`
sw.js file: `import{precacheAndRoute} from ‘workbox-precaching’
/* This is a placeholder file to avoid generating an error when the app is served before being built */ console.info(‘Service worker disabled for development, will be generated at build time.’);
workbox.precaching.precacheAndRoute(self.__WB_MANIFEST) `
Issue: Only html and js files are precached. Json and any other additional extention are ignored.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:2
- Comments:7 (1 by maintainers)
Top GitHub Comments
Ah okay, thats different than the Rollup issue yeah, its probably best to create a new issue for that on the webpack workbox plugin repo. I did run into a problem with webpack where files that werent handled by webpack werent precached, but using the webpack copy plugin solved that for me, so im afraid i cant help you there
Thanks for investigating. I’m going to close this issue. Feel free to open a new issue with details related to the different scenario as needed.