include crypto-api src into lib to get around mjs import issue. compiled node lib now requires successfully.

This commit is contained in:
d98762625 2018-08-10 17:44:40 +01:00
parent 91eb692d99
commit 20452fe3cb
4 changed files with 2064 additions and 2062 deletions

View File

@ -255,7 +255,9 @@ module.exports = function (grunt) {
mode: "production",
target: "node",
entry: "./src/node/index.mjs",
externals: [NodeExternals()],
externals: [NodeExternals({
whitelist: ["crypto-api/src/crypto-api"]
})],
output: {
filename: "CyberChef.js",
path: __dirname + "/build/node",
@ -264,7 +266,7 @@ module.exports = function (grunt) {
},
plugins: [
new webpack.DefinePlugin(BUILD_CONSTANTS)
]
],
}
},
"webpack-dev-server": {
@ -390,7 +392,6 @@ module.exports = function (grunt) {
generateNodeIndex: {
command: [
"echo '\n--- Regenerating node index ---'",
"echo 'Copying OperationConfig.json and wiping original'",
"cp src/core/config/OperationConfig.json src/node/config/OperationConfig.json",
"echo 'export default {};\n' > src/core/config/modules/OpModules.mjs",

4114
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -28,6 +28,7 @@
"url": "https://github.com/gchq/CyberChef/"
},
"main": "build/node/CyberChef.js",
"module": "src/node/index.mjs",
"bugs": "https://github.com/gchq/CyberChef/issues",
"devDependencies": {
"babel-core": "^6.26.3",

View File

@ -46,8 +46,8 @@ module.exports = {
],
resolve: {
alias: {
jquery: "jquery/src/jquery"
}
jquery: "jquery/src/jquery",
},
},
module: {
rules: [