mirror of
https://github.com/gchq/CyberChef.git
synced 2025-04-20 06:55:08 -04:00
ESM: Config scripts now run synchronously before webpack builds start
This commit is contained in:
parent
23f69bd21d
commit
4e38b09e18
5 changed files with 35 additions and 37 deletions
|
@ -1,6 +1,6 @@
|
|||
const webpack = require("webpack");
|
||||
const ExtractTextPlugin = require("extract-text-webpack-plugin");
|
||||
const WebpackShellPlugin = require("webpack-shell-plugin");
|
||||
const WebpackSyncShellPlugin = require("webpack-synchronizable-shell-plugin");
|
||||
|
||||
/**
|
||||
* Webpack configuration details for use with Grunt.
|
||||
|
@ -44,11 +44,16 @@ module.exports = {
|
|||
entryOnly: true
|
||||
}),
|
||||
new ExtractTextPlugin("styles.css"),
|
||||
new WebpackShellPlugin({
|
||||
onBuildStart: [
|
||||
"node --experimental-modules src/core/config/scripts/generateOpsIndex.mjs",
|
||||
"node --experimental-modules src/core/config/scripts/generateConfig.mjs",
|
||||
],
|
||||
new WebpackSyncShellPlugin({
|
||||
onBuildStart: {
|
||||
scripts: [
|
||||
"node --experimental-modules src/core/config/scripts/generateOpsIndex.mjs",
|
||||
"node --experimental-modules src/core/config/scripts/generateConfig.mjs",
|
||||
"echo ---\nConfig scripts finished.\n---\n"
|
||||
],
|
||||
blocking: true,
|
||||
parallel: false
|
||||
}
|
||||
})
|
||||
],
|
||||
resolve: {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue