Add canvas as externals in webpack.config.js

This commit is contained in:
Sruthi Chandran 2020-12-09 23:02:53 +05:30
parent 4a8c79befd
commit f28d3cb20b

View file

@ -16,7 +16,16 @@ Use debian packaged node modules when available
const CopyWebpackPlugin = require('copy-webpack-plugin');
const vendorDllHash = require('./helpers/vendor_dll_hash');
@@ -159,13 +158,13 @@
@@ -150,6 +149,8 @@
entry: generateEntries,
+ externals: [ 'canvas' ],
+
output: {
path: path.join(ROOT_PATH, 'public/assets/webpack'),
publicPath: '/assets/webpack/',
@@ -159,13 +160,13 @@
},
resolve: {
@ -33,7 +42,7 @@ Use debian packaged node modules when available
},
module: {
@@ -178,9 +177,13 @@
@@ -178,9 +179,13 @@
},
{
test: /\.js$/,
@ -48,7 +57,7 @@ Use debian packaged node modules when available
loader: 'babel-loader',
options: {
cacheDirectory: path.join(CACHE_PATH, 'babel-loader'),
@@ -516,19 +519,6 @@
@@ -516,19 +521,6 @@
// enable HMR only in webpack-dev-server
DEV_SERVER_LIVERELOAD && new webpack.HotModuleReplacementPlugin(),
@ -68,7 +77,7 @@ Use debian packaged node modules when available
new webpack.DefinePlugin({
// This one is used to define window.gon.ee and other things properly in tests:
'process.env.IS_EE': JSON.stringify(IS_EE),
@@ -563,6 +553,7 @@
@@ -563,6 +555,7 @@
node: {
fs: 'empty', // sqljs requires fs