Closed sdykae closed 4 years ago
Ahm, I tried this rollup config file
import babel from 'rollup-plugin-babel';
import resolve from 'rollup-plugin-node-resolve';
import WorkboxRollupPlugin from 'rollup-plugin-workbox';
export default [{
input: './src/components/my-app.js',
output: [
{
dir: 'public/dist',
format: 'esm'
}
],
plugins: [
resolve({
jsnext: true
})
]
},
{
input: './src/components/my-app.js',
output: [
{
dir: 'public/dist_nomodule',
format: 'system'
}
],
plugins: [
resolve({
// use "jsnext:main" if possible
// legacy field pointing to ES6 module in third-party libraries,
// deprecated in favor of "pkg.module":
// - see: https://github.com/rollup/rollup/wiki/pkg.module
jsnext: true, // Default: false
}),
babel({
"presets": [
["@babel/preset-env", {"targets": {"ie": "11"}}]
],
"plugins": ["@babel/plugin-syntax-dynamic-import"]
}),
WorkboxRollupPlugin({
mode:'generateSW',
workboxConfig: {
globDirectory: '',
globPatterns: ['index.html','manifest.json','*.js'],
navigateFallback: 'index.html',
swDest: 'public/service-worker.js',
clientsClaim: true,
skipWaiting: true,
runtimeCaching: [
{
urlPattern: /^https:\/\/fonts.gstatic.com\//,
handler: 'staleWhileRevalidate'
}
]
}})
]
}];
Outputs the missing worker but not the precache manifest. help?
This project is no longer under development and will be transitioning to a read-only repo. Thank you for your contributions.
Is rollup branch for deployment? I cant get the static build to success ;c