|
|
|
@ -1,4 +1,4 @@
|
|
|
|
|
var Encore = require('@symfony/webpack-encore');
|
|
|
|
|
const Encore = require('@symfony/webpack-encore');
|
|
|
|
|
// add the the copy-webpack-plugin
|
|
|
|
|
const CopyPlugin = require('copy-webpack-plugin');
|
|
|
|
|
|
|
|
|
@ -32,16 +32,14 @@ Encore
|
|
|
|
|
/*
|
|
|
|
|
* ENTRY CONFIG
|
|
|
|
|
*
|
|
|
|
|
* Add 1 entry for each "page" of your app
|
|
|
|
|
* (including one that's included on every page - e.g. "app")
|
|
|
|
|
*
|
|
|
|
|
* Each entry will result in one JavaScript file (e.g. app.js)
|
|
|
|
|
* and one CSS file (e.g. app.css) if your JavaScript imports CSS.
|
|
|
|
|
*/
|
|
|
|
|
.addEntry('app', './assets/js/app.js')
|
|
|
|
|
.addEntry('pdf', './assets/js/pdf.js')
|
|
|
|
|
//.addEntry('page1', './assets/js/page1.js')
|
|
|
|
|
//.addEntry('page2', './assets/js/page2.js')
|
|
|
|
|
|
|
|
|
|
// enables the Symfony UX Stimulus bridge (used in assets/bootstrap.js)
|
|
|
|
|
.enableStimulusBridge('./assets/controllers.json')
|
|
|
|
|
|
|
|
|
|
// When enabled, Webpack "splits" your files into smaller pieces for greater optimization.
|
|
|
|
|
.splitEntryChunks()
|
|
|
|
@ -63,6 +61,10 @@ Encore
|
|
|
|
|
// enables hashed filenames (e.g. app.abc123.css)
|
|
|
|
|
.enableVersioning(Encore.isProduction())
|
|
|
|
|
|
|
|
|
|
.configureBabel((config) => {
|
|
|
|
|
config.plugins.push('@babel/plugin-proposal-class-properties');
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
// enables @babel/preset-env polyfills
|
|
|
|
|
.configureBabelPresetEnv((config) => {
|
|
|
|
|
config.useBuiltIns = 'usage';
|
|
|
|
@ -75,16 +77,15 @@ Encore
|
|
|
|
|
// uncomment if you use TypeScript
|
|
|
|
|
//.enableTypeScriptLoader()
|
|
|
|
|
|
|
|
|
|
// uncomment if you use React
|
|
|
|
|
//.enableReactPreset()
|
|
|
|
|
|
|
|
|
|
// uncomment to get integrity="..." attributes on your script & link tags
|
|
|
|
|
// requires WebpackEncoreBundle 1.4 or higher
|
|
|
|
|
//.enableIntegrityHashes(Encore.isProduction())
|
|
|
|
|
|
|
|
|
|
// uncomment if you're having problems with a jQuery plugin
|
|
|
|
|
//.autoProvidejQuery()
|
|
|
|
|
|
|
|
|
|
// uncomment if you use API Platform Admin (composer req api-admin)
|
|
|
|
|
//.enableReactPreset()
|
|
|
|
|
//.addEntry('admin', './assets/js/admin.js')
|
|
|
|
|
;
|
|
|
|
|
;
|
|
|
|
|
|
|
|
|
|
module.exports = Encore.getWebpackConfig();
|
|
|
|
|