updated webpack dev build to run 'drush cc css-js'

This commit is contained in:
2022-08-10 14:49:59 +02:00
parent 44df557f29
commit 75ea440f89
3 changed files with 22 additions and 1 deletions

View File

@@ -5,6 +5,7 @@ const { merge } = require('webpack-merge')
const baseConfig = require('./webpack.config.base')
const MiniCssExtractPlugin = require("mini-css-extract-plugin");
const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin;
const WebpackShellPluginNext = require('webpack-shell-plugin-next');
module.exports = merge(baseConfig, {
mode: 'development',
@@ -51,6 +52,19 @@ module.exports = merge(baseConfig, {
// new webpack.HotModuleReplacementPlugin()
new BundleAnalyzerPlugin({
'analyzerMode': 'static'
}),
new WebpackShellPluginNext({
// onBuildStart:{
// scripts: ['echo "Webpack Start"'],
// blocking: true,
// parallel: false
// },
// drush is not installed in this container so we have to ssh on the php container
onAfterDone:{
scripts: ['echo "Clearing drupal cache $USER_UNAME $DRUPAL_ROOT"', 'sshpass -p "$USER_UNAME" ssh $USER_UNAME@php "cd $DRUPAL_ROOT && drush cc css-js"', 'echo "Done"'],
blocking: true,
parallel: false
}
})
]
})