webpack.config.js 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. let Encore = require('@symfony/webpack-encore');
  2. Encore
  3. // directory where compiled assets will be stored
  4. .setOutputPath('web/build/')
  5. // public path used by the web server to access the output path
  6. .setPublicPath('/build')
  7. // only needed for CDN's or sub-directory deploy
  8. //.setManifestKeyPrefix('build/')
  9. /*
  10. * ENTRY CONFIG
  11. *
  12. * Add 1 entry for each "page" of your app
  13. * (including one that's included on every page - e.g. "app")
  14. *
  15. * Each entry will result in one JavaScript file (e.g. app.js)
  16. * and one CSS file (e.g. app.css) if you JavaScript imports CSS.
  17. */
  18. .addEntry('app', './assets/js/app.js')
  19. //.addEntry('suivifilms', './assets/js/suivifilms.js')
  20. //.addEntry('collectiontypeadd', './assets/js/collectiontypeadd.js')
  21. .cleanupOutputBeforeBuild()
  22. .enableSourceMaps(!Encore.isProduction())
  23. // enables hashed filenames (e.g. app.abc123.css)
  24. .enableVersioning(Encore.isProduction())
  25. // uncomment if you use TypeScript
  26. //.enableTypeScriptLoader()
  27. // uncomment if you use Sass/SCSS files
  28. .enableSassLoader()
  29. // uncomment if you're having problems with a jQuery plugin
  30. .autoProvidejQuery()
  31. ;
  32. module.exports = Encore.getWebpackConfig();