mirror of
https://github.com/jbcr/core.git
synced 2026-04-04 23:32:18 +02:00
32 lines
1.1 KiB
JavaScript
32 lines
1.1 KiB
JavaScript
var Encore = require('@symfony/webpack-encore');
|
|
|
|
const WorkboxPlugin = require('workbox-webpack-plugin');
|
|
|
|
Encore
|
|
// the project directory where all compiled assets will be stored
|
|
.setOutputPath('public/assets/')
|
|
// the public path used by the web server to access the previous directory
|
|
.setPublicPath('/assets')
|
|
|
|
.addEntry('bolt', './assets/js/bolt.js')
|
|
|
|
.autoProvidejQuery()
|
|
.enableVueLoader()
|
|
|
|
// TODO: To keep or be removed if not needed
|
|
// filenames include a hash that changes whenever the file contents change
|
|
// .enableVersioning()
|
|
|
|
// Workbox should always be the last plugin to add @see: https://developers.google.com/web/tools/workbox/guides/codelabs/webpack#optional-config
|
|
.addPlugin(
|
|
new WorkboxPlugin.GenerateSW({
|
|
// these options encourage the ServiceWorkers to get in there fast
|
|
// and not allow any straggling "old" SWs to hang around
|
|
clientsClaim: true,
|
|
skipWaiting: false,
|
|
importsDirectory: 'sw/',
|
|
}))
|
|
;
|
|
// export the final configuration
|
|
|
|
module.exports = Encore.getWebpackConfig(); |