mirror of
https://github.com/gchq/CyberChef
synced 2025-12-05 23:53:27 +00:00
ESM: Config scripts now run synchronously before webpack builds start
This commit is contained in:
@@ -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: {
|
||||
|
||||
Reference in New Issue
Block a user