@@ -55,10 +55,9 @@ is the main config file for both Webpack and Webpack Encore:
55
55
.. code-block :: javascript
56
56
57
57
var Encore = require (' @symfony/webpack-encore' );
58
-
58
+
59
59
// Manually configure the runtime environment if not already configured yet by the "encore" command.
60
60
// It's useful when you use tools that rely on webpack.config.js file.
61
-
62
61
if (! Encore .isRuntimeEnvironmentConfigured ()) {
63
62
Encore .configureRuntimeEnvironment (process .env .NODE_ENV || ' dev' );
64
63
}
@@ -83,7 +82,7 @@ is the main config file for both Webpack and Webpack Encore:
83
82
.addEntry (' app' , ' ./assets/js/app.js' )
84
83
// .addEntry('page1', './assets/js/page1.js')
85
84
// .addEntry('page2', './assets/js/page2.js')
86
-
85
+
87
86
// When enabled, Webpack "splits" your files into smaller pieces for greater optimization.
88
87
.splitEntryChunks ()
89
88
@@ -103,26 +102,26 @@ is the main config file for both Webpack and Webpack Encore:
103
102
.enableSourceMaps (! Encore .isProduction ())
104
103
// enables hashed filenames (e.g. app.abc123.css)
105
104
.enableVersioning (Encore .isProduction ())
106
-
105
+
107
106
// enables @babel/preset-env polyfills
108
107
.configureBabelPresetEnv ((config ) => {
109
108
config .useBuiltIns = ' usage' ;
110
109
config .corejs = 3 ;
111
110
})
112
-
111
+
113
112
// enables Sass/SCSS support
114
113
// .enableSassLoader()
115
114
116
115
// uncomment if you use TypeScript
117
116
// .enableTypeScriptLoader()
118
-
117
+
119
118
// uncomment to get integrity="..." attributes on your script & link tags
120
119
// requires WebpackEncoreBundle 1.4 or higher
121
120
// .enableIntegrityHashes(Encore.isProduction())
122
121
123
122
// uncomment if you're having problems with a jQuery plugin
124
123
// .autoProvidejQuery()
125
-
124
+
126
125
// uncomment if you use API Platform Admin (composer require api-admin)
127
126
// .enableReactPreset()
128
127
// .addEntry('admin', './assets/js/admin.js')
0 commit comments