webpack.config.js 745 B

1234567891011121314151617181920212223242526
  1. var Encore = require('@symfony/webpack-encore');
  2. Encore
  3. .setOutputPath('public/build/')
  4. .setPublicPath('/build')
  5. // read main.js -> output as web/build/chamilo.js
  6. .addEntry('chamilo', './public/assets/js/main.js')
  7. // read main.scss -> output as web/build/chamilo_style.css
  8. .addStyleEntry('chamilo_style', './public/assets/css/main.scss')
  9. // enable features!
  10. .enableSassLoader()
  11. .autoProvidejQuery()
  12. .enableReactPreset()
  13. .enableSourceMaps(!Encore.isProduction())
  14. .autoProvideVariables({
  15. $: 'jquery',
  16. jQuery: 'jquery',
  17. 'window.jQuery': 'jquery'
  18. })
  19. //.enableVersioning() // hashed filenames (e.g. main.abc123.js)
  20. ;
  21. module.exports = Encore.getWebpackConfig();