Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
themes.forEach(function (theme) {
Encore.addStyleEntry('css/themes/' + theme + '/default', './assets/css/themes/' + theme + '/default.css');
// Copy images from themes into public/build
Encore.addPlugin(new CopyPlugin({
patterns: [{
from: 'assets/css/themes/' + theme + '/images',
to: 'css/themes/' + theme + '/images'
}]
},
));
});
const WebpackBar = require('webpackbar');
const Encore = require('@symfony/webpack-encore');
Encore
.addPlugin(
new WebpackBar({
profile: Encore.isProduction(),
minimal: false,
}),
)
.setOutputPath('public/assets/')
.setPublicPath('/assets')
.setManifestKeyPrefix('assets')
.copyFiles({
from: './assets/static',
})
.cleanupOutputBeforeBuild()
'./node_modules/@claviska/jquery-selectable/jquery.selectable.js',
'./node_modules/lodash/lodash.min.js',
'./node_modules/slugify/index.js',
'./app/source/scripts/modules/leafpub.js',
'./app/source/scripts/modules/locater.js',
'./app/source/scripts/modules/reauthenticate.js',
'./app/source/scripts/modules/shared.js'
])
.addStyleEntry('admin-toolbar', [
'./app/source/styles/admin-toolbar.scss'
])
;
if (Encore.isProduction()){
Encore.addPlugin(prodMode);
Encore.addPlugin(preCache);
}
var webPackConfig = Encore.getWebpackConfig();
webPackConfig.resolve.extensions.push('.json');
webPackConfig.resolve.extensions.push('.vue');
webPackConfig.resolve.alias = {
"datatables.net": "datatables.net/js/jquery.dataTables.js",
"datetime": 'datatables.net-plugins/sorting/datetime-moment.js',
//'vue': 'vue/dist/vue.js',
'vue$': 'vue/dist/vue.esm.js',
};
webPackConfig.watchOptions = {
poll: true
'./node_modules/lodash/lodash.min.js',
'./node_modules/slugify/index.js',
'./app/source/scripts/modules/leafpub.js',
'./app/source/scripts/modules/locater.js',
'./app/source/scripts/modules/reauthenticate.js',
'./app/source/scripts/modules/shared.js'
])
.addStyleEntry('admin-toolbar', [
'./app/source/styles/admin-toolbar.scss'
])
;
if (Encore.isProduction()){
Encore.addPlugin(prodMode);
Encore.addPlugin(preCache);
}
var webPackConfig = Encore.getWebpackConfig();
webPackConfig.resolve.extensions.push('.json');
webPackConfig.resolve.extensions.push('.vue');
webPackConfig.resolve.alias = {
"datatables.net": "datatables.net/js/jquery.dataTables.js",
"datetime": 'datatables.net-plugins/sorting/datetime-moment.js',
//'vue': 'vue/dist/vue.js',
'vue$': 'vue/dist/vue.esm.js',
};
webPackConfig.watchOptions = {
poll: true
};