@@ -17,15 +17,13 @@ Encore
1717 /*
1818 * ENTRY CONFIG
1919 *
20- * Add 1 entry for each "page" of your app
21- * (including one that's included on every page - e.g. "app")
22- *
2320 * Each entry will result in one JavaScript file (e.g. app.js)
2421 * and one CSS file (e.g. app.css) if your JavaScript imports CSS.
2522 */
2623 . addEntry ( 'app' , './assets/app.js' )
27- //.addEntry('page1', './assets/page1.js')
28- //.addEntry('page2', './assets/page2.js')
24+
25+ // enables the Symfony UX Stimulus bridge (used in assets/bootstrap.js)
26+ . enableStimulusBridge ( './assets/controllers.json' )
2927
3028 // When enabled, Webpack "splits" your files into smaller pieces for greater optimization.
3129 . splitEntryChunks ( )
@@ -47,6 +45,10 @@ Encore
4745 // enables hashed filenames (e.g. app.abc123.css)
4846 . enableVersioning ( Encore . isProduction ( ) )
4947
48+ . configureBabel ( ( config ) => {
49+ config . plugins . push ( '@babel/plugin-proposal-class-properties' ) ;
50+ } )
51+
5052 // enables @babel /preset-env polyfills
5153 . configureBabelPresetEnv ( ( config ) => {
5254 config . useBuiltIns = 'usage' ;
@@ -59,16 +61,15 @@ Encore
5961 // uncomment if you use TypeScript
6062 //.enableTypeScriptLoader()
6163
64+ // uncomment if you use React
65+ //.enableReactPreset()
66+
6267 // uncomment to get integrity="..." attributes on your script & link tags
6368 // requires WebpackEncoreBundle 1.4 or higher
6469 //.enableIntegrityHashes(Encore.isProduction())
6570
6671 // uncomment if you're having problems with a jQuery plugin
6772 //.autoProvidejQuery()
68-
69- // uncomment if you use API Platform Admin (composer req api-admin)
70- //.enableReactPreset()
71- //.addEntry('admin', './assets/admin.js')
7273;
7374
7475module . exports = Encore . getWebpackConfig ( ) ;
0 commit comments