Skip to content

Commit 7a2f071

Browse files
committed
Dependencies in the node version are now kept external in the webpack build
1 parent d46e279 commit 7a2f071

File tree

3 files changed

+14
-8
lines changed

3 files changed

+14
-8
lines changed

Gruntfile.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
const webpack = require("webpack");
22
const ExtractTextPlugin = require("extract-text-webpack-plugin");
33
const HtmlWebpackPlugin = require("html-webpack-plugin");
4+
const NodeExternals = require("webpack-node-externals");
45
const Inliner = require("web-resource-inliner");
56

67
module.exports = function (grunt) {
@@ -294,6 +295,7 @@ module.exports = function (grunt) {
294295
tests: {
295296
target: "node",
296297
entry: "./test/index.js",
298+
externals: [NodeExternals()],
297299
output: {
298300
filename: "index.js",
299301
path: __dirname + "/build/test"
@@ -302,6 +304,7 @@ module.exports = function (grunt) {
302304
node: {
303305
target: "node",
304306
entry: "./src/node/index.js",
307+
externals: [NodeExternals()],
305308
output: {
306309
filename: "CyberChef.js",
307310
path: __dirname + "/build/node",

package-lock.json

Lines changed: 8 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@
3232
"devDependencies": {
3333
"babel-core": "^6.24.0",
3434
"babel-loader": "^7.1.1",
35-
"babel-polyfill": "^6.23.0",
3635
"babel-preset-env": "^1.6.0",
3736
"css-loader": "^0.28.4",
3837
"exports-loader": "^0.6.4",
@@ -60,11 +59,13 @@
6059
"style-loader": "^0.18.2",
6160
"url-loader": "^0.5.8",
6261
"web-resource-inliner": "^4.1.0",
63-
"webpack": "^3.3.0"
62+
"webpack": "^3.3.0",
63+
"webpack-node-externals": "^1.6.0"
6464
},
6565
"dependencies": {
6666
"bootstrap": "^3.3.7",
6767
"bootstrap-colorpicker": "^2.5.1",
68+
"babel-polyfill": "^6.23.0",
6869
"bootstrap-switch": "^3.3.4",
6970
"crypto-api": "^0.6.2",
7071
"crypto-js": "^3.1.9-1",

0 commit comments

Comments
 (0)