text: var Encore = require('@symfony/webpack-encore');
  
  // Manually configure the runtime environment if not already configured yet by the "encore" command.
  // It's useful when you use tools that rely on webpack.config.js file.
  if (!Encore.isRuntimeEnvironmentConfigured()) {
      Encore.configureRuntimeEnvironment(process.env.NODE_ENV || 'dev');
  }
  
  Encore
      // directory where compiled assets will be stored
      .setOutputPath('public/build/')
  
      // public path used by the web server to access the output path
      .setPublicPath('/build')
  
      .addEntry('app', './assets/js/app.js')
  
      // When enabled, Webpack "splits" your files into smaller pieces for greater optimization.
      .splitEntryChunks()
  
      .enableSingleRuntimeChunk()
      .cleanupOutputBeforeBuild()
      .enableBuildNotifications()
      .enableSourceMaps(!Encore.isProduction())
      // enables hashed filenames (e.g. app.abc123.css)
      .enableVersioning(Encore.isProduction())
  
      // enables @babel/preset-env polyfills
      .configureBabelPresetEnv((config) => {
          config.useBuiltIns = 'usage';
          config.corejs = 3;
      })
  
      // Images
      .copyFiles({
          from: './assets/images',
          to: 'images/[path][name].[hash:8].[ext]'
      })
  
      // enables Less support
      .enableLessLoader()
  ;
  
  module.exports = Encore.getWebpackConfig();
  