Skip to content

Commit cfa88dc

Browse files
committed
don't parse vega-lib/build/vega.js
1 parent 45bf712 commit cfa88dc

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

packages/kbn-optimizer/src/worker/webpack.config.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,9 +138,12 @@ export function getWebpackConfig(bundle: Bundle, worker: WorkerConfig) {
138138

139139
module: {
140140
// no parse rules for a few known large packages which have no require() statements
141+
// or which have require() statements that should be ignored because the file is
142+
// already bundled with all its necessary depedencies
141143
noParse: [
142144
/[\///]node_modules[\///]elasticsearch-browser[\///]/,
143-
/[\///]node_modules[\///]lodash[\///]index\.js/,
145+
/[\///]node_modules[\///]lodash[\///]index\.js$/,
146+
/[\///]node_modules[\///]vega-lib[\///]build[\///]vega\.js$/,
144147
],
145148

146149
rules: [

src/legacy/ui/ui_exports/ui_export_defaults.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ export const UI_EXPORT_DEFAULTS = {
2424
webpackNoParseRules: [
2525
/node_modules[\/\\](angular|elasticsearch-browser)[\/\\]/,
2626
/node_modules[\/\\](mocha|moment)[\/\\]/,
27+
/node_modules[\/\\]vega-lib[\/\\]build[\/\\]vega\.js$/,
2728
],
2829

2930
webpackAliases: {

0 commit comments

Comments
 (0)