How to use the @symfony/webpack-encore.configureDefinePlugin function in @symfony/webpack-encore

To help you get started, we’ve selected a few @symfony/webpack-encore examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github liorchamla / formation-api-platform-react / webpack.config.js View on Github external
//.enableSassLoader()

  // uncomment if you use TypeScript
  //.enableTypeScriptLoader()
  // uncomment to get integrity="..." attributes on your script & link tags
  // requires WebpackEncoreBundle 1.4 or higher
  //.enableIntegrityHashes()

  // 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')

Encore.configureDefinePlugin(options => {
  options["process.env"].API_URL = process.env.API_URL;
});

module.exports = Encore.getWebpackConfig();