You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
38 lines
1.1 KiB
38 lines
1.1 KiB
var Encore = require('@symfony/webpack-encore');
|
|
|
|
Encore
|
|
.setOutputPath('public/build/')
|
|
|
|
.setManifestKeyPrefix('build/public')
|
|
// If chamilo is installed in localhost/chamilo2
|
|
//.setPublicPath('/chamilo2/public/build/')
|
|
// If chamilo is installed in a domain my.chamilo.net
|
|
.setPublicPath('/build')
|
|
.cleanupOutputBeforeBuild()
|
|
// enable features!
|
|
.enableSassLoader()
|
|
.autoProvidejQuery()
|
|
.enableReactPreset()
|
|
|
|
// read main.js -> output as public/build/chamilo.js
|
|
.addEntry('chamilo', './assets/js/main.js')
|
|
// read main.scss -> output as web/build/css/base.css
|
|
.addStyleEntry('css/base', './assets/css/main.scss')
|
|
|
|
// Add chamilo themes
|
|
.addStyleEntry('css/themes/academica/default', './assets/css/themes/academica/default.css')
|
|
.addStyleEntry('css/themes/chamilo/default', './assets/css/themes/chamilo/default.css')
|
|
|
|
|
|
|
|
.enableSourceMaps(!Encore.isProduction())
|
|
.autoProvideVariables({
|
|
$: 'jquery',
|
|
jQuery: 'jquery',
|
|
'window.jQuery': 'jquery'
|
|
})
|
|
//.enableVersioning() // hashed filenames (e.g. main.abc123.js)
|
|
;
|
|
|
|
module.exports = Encore.getWebpackConfig();
|
|
|
|
|