You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
i wish to add generated manifest.json to the SWprecache array .
copied/generated manifest.json does not get included in precache-manifest.js.
This is the config i am using in webpack config:
new WebpackPwaManifest({
name: 'TestApp',
short_name: 'TestApp',
description: 'Description!',
background_color: '#01579b',
theme_color: '#01579b',
'theme-color': '#01579b',
start_url: '/',
icons: [
{
src: path.resolve('src/assets/icons/icon.png'),
sizes: [96, 128,144,152,192, 256, 384, 512],
destination: path.join('assets', 'icons')
}
]
}),
new InjectManifest({
globDirectory: '.',
globPatterns: ['dist/manifest.*.json'],
swSrc: './src/sw-default.js',
swDest: './sw.js',
})
Tried with new CopyWebpackPlugin([{from:'./src/manifest.json',to:'./assets'},{from:'./src/assets/icons',to:'assets/icons'}]),
manifest.json is precached.
but with
new CopyWebpackPlugin([{from:'./src/manifest.json'},{from:'./src/assets/icons',to:'assets/icons'}]),
it does not work -InjectManifest plugin adds manifest.json if its in assets directory but not when its in the same build directory .
Is this an issue with the plugin or should i configure it differently?
-----------Edit: got manifest.json in to precache by providing the glob directory as src and patterns as .json. But i had to generate manifest.json in the source directory to get it in to precache manifest. Please let me know if this can be achieved through plugin .
The text was updated successfully, but these errors were encountered:
I'm thinking that we might need to do something specific to pick up on the output of the WebpackPwaManifest in the list of assets that workbox-webpack-plugin knows about.
jeffposnick
changed the title
copied/generated manifest.json does not get included in precache-manifest.js (InjectManifest)
Precaching the generated WebpackPwaManifest manifest asset
Jul 26, 2018
*workbox-webpack-plugin.^3.4.1
Browser & Platform:
chrome,"webpack": "^4.15.0",node v10.6.0,npm 6.1.0,ubuntu 16.04
i wish to add generated manifest.json to the SWprecache array .
copied/generated manifest.json does not get included in precache-manifest.js.
This is the config i am using in webpack config:
new WebpackPwaManifest({
name: 'TestApp',
short_name: 'TestApp',
description: 'Description!',
background_color: '#01579b',
theme_color: '#01579b',
'theme-color': '#01579b',
start_url: '/',
icons: [
{
src: path.resolve('src/assets/icons/icon.png'),
sizes: [96, 128,144,152,192, 256, 384, 512],
destination: path.join('assets', 'icons')
}
]
}),
new InjectManifest({
globDirectory: '.',
globPatterns: ['dist/manifest.*.json'],
swSrc: './src/sw-default.js',
swDest: './sw.js',
Tried with new CopyWebpackPlugin([{from:'./src/manifest.json',to:'./assets'},{from:'./src/assets/icons',to:'assets/icons'}]),
manifest.json is precached.
but with
new CopyWebpackPlugin([{from:'./src/manifest.json'},{from:'./src/assets/icons',to:'assets/icons'}]),
it does not work -InjectManifest plugin adds manifest.json if its in assets directory but not when its in the same build directory .
Is this an issue with the plugin or should i configure it differently?
-----------Edit: got manifest.json in to precache by providing the glob directory as src and patterns as .json. But i had to generate manifest.json in the source directory to get it in to precache manifest. Please let me know if this can be achieved through plugin .
The text was updated successfully, but these errors were encountered: