New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Write precache-manifest path #1508
Comments
What does the rest of your |
I used nextjs. My next.config.js: const {GenerateSW} = require('workbox-webpack-plugin');
const withTypescript = require('@zeit/next-typescript');
const withCSS = require('@zeit/next-css');
const webpack = require('webpack');
const path = require('path');
const Dotenv = require('dotenv-webpack');
module.exports = withTypescript(
withCSS({
webpack(config) {
if (process.env.NODE_ENV === 'develop') {
config.plugins.push(
new GenerateSW({
cacheId: 'mercari-web-jp',
swDest: path.resolve('./.next/static/sw.js'),
importsDirectory: 'static',
// importWorkboxFrom: 'local', TODO: fix this
clientsClaim: true,
skipWaiting: true,
runtimeCaching: [
{
urlPattern: '/',
handler: 'staleWhileRevalidate',
options: {
cacheName: 'top-cache',
expiration: {
maxEntries: 5,
maxAgeSeconds: 60,
},
},
},
],
})
)
}
return config
},
}),
) versions: "next": "^6.0.2"
"webpack": "^3.12.0",
"workbox-sw": "^3.2.0",
"workbox-webpack-plugin": "^3.2.0" |
Does |
In |
Even though I'm late to the party, but maybe it will help someone:
|
Library Affected:
workbox-webpack-plugin
Browser & Platform:
"all browsers".
Issue or Feature Request Description:
Can write precache-manifest.js dist path
When reporting bugs, please include relevant JavaScript Console logs and links to public URLs at which the issue could be reproduced.
write config:
generated sw.js:
.next/static/sw.js
generated manifest.js:
.next/static/precache-manifest.${hash}.js
But this is not corrected path of importScripts
Can I fixed this??
The text was updated successfully, but these errors were encountered: