updated webpack dev build to run 'drush cc css-js'
This commit is contained in:
@@ -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
|
||||
}
|
||||
})
|
||||
]
|
||||
})
|
||||
|
Reference in New Issue
Block a user