Use single webpack and npm config
This commit is contained in:
@@ -0,0 +1,58 @@
|
||||
const Encore = require('@symfony/webpack-encore');
|
||||
const webpack = require('webpack');
|
||||
|
||||
// Create webpack config for ext:ep_theme
|
||||
Encore
|
||||
.setOutputPath('./web/typo3conf/ext/ep_theme/Resources/Public/')
|
||||
.setPublicPath('/typo3conf/ext/ep_theme/Resources/Public/')
|
||||
.addEntry('main', './web/typo3conf/ext/ep_theme/Resources/Private/Assets/js/main.js')
|
||||
.addStyleEntry('boarderweek', './web/typo3conf/ext/ep_theme/Resources/Private/Assets/scss/main_boarderweek.scss')
|
||||
.addStyleEntry('snowzone', './web/typo3conf/ext/ep_theme/Resources/Private/Assets/scss/main_snowzone.scss')
|
||||
.addStyleEntry('unichamp', './web/typo3conf/ext/ep_theme/Resources/Private/Assets/scss/main_unichamp.scss')
|
||||
.addStyleEntry('rte', './web/typo3conf/ext/ep_theme/Resources/Private/Assets/css/rte.css')
|
||||
.createSharedEntry('vendor', [
|
||||
'jquery', 'vue', 'bootstrap/dist/js/bootstrap', 'slick-carousel',
|
||||
'moment', 'cookieconsent', 'picturefill', '@fancyapps/fancybox'
|
||||
])
|
||||
.addPlugin(new webpack.IgnorePlugin(/^\.\/locale$/, /moment$/))
|
||||
.enableSassLoader()
|
||||
.enableVueLoader()
|
||||
.autoProvidejQuery()
|
||||
.enableSourceMaps(!Encore.isProduction())
|
||||
.cleanupOutputBeforeBuild()
|
||||
.enablePostCssLoader()
|
||||
.configureFilenames({
|
||||
js: 'js/[name].js',
|
||||
css: 'css/[name].css',
|
||||
images: 'images/[name].[ext]'
|
||||
})
|
||||
;
|
||||
|
||||
const EpThemeConfig = Encore.getWebpackConfig();
|
||||
EpThemeConfig.name = 'EpThemeConfig';
|
||||
|
||||
Encore.reset();
|
||||
|
||||
// Create config for ext:ep_events
|
||||
Encore
|
||||
.setOutputPath('./web/typo3conf/ext/ep_events/Resources/Public/')
|
||||
.setPublicPath('/typo3conf/ext/ep_events/Resources/Public/')
|
||||
.addEntry('main', './web/typo3conf/ext/ep_events/Resources/Private/Assets/js/main.js')
|
||||
.addStyleEntry('rte', './web/typo3conf/ext/ep_events/Resources/Private/Assets/css/rte.css')
|
||||
.enableSassLoader()
|
||||
.enableVueLoader()
|
||||
.autoProvidejQuery()
|
||||
.enableSourceMaps(!Encore.isProduction())
|
||||
.cleanupOutputBeforeBuild()
|
||||
.enablePostCssLoader()
|
||||
.configureFilenames({
|
||||
js: 'js/[name].js',
|
||||
css: 'css/[name].css',
|
||||
images: 'images/[name].[ext]'
|
||||
})
|
||||
;
|
||||
|
||||
const EpEventsConfig = Encore.getWebpackConfig();
|
||||
EpEventsConfig.name = 'EpEventsConfig';
|
||||
|
||||
module.exports = [EpThemeConfig, EpEventsConfig];
|
||||
Reference in New Issue
Block a user