File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed
Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -50,6 +50,13 @@ module.exports = (env, argv) => {
5050 new webpack . IgnorePlugin ( {
5151 resourceRegExp : / p s - l i s t / , // matches the path in the require() statement
5252 } ) ,
53+ /**
54+ * HACK: the node: prefix'd modules breaks Web mode if imported, BUT we still dynamically import this module for non web mode
55+ * environments. The following allows compilation to pass by never bundling the module in the final output for web mode.
56+ */
57+ new webpack . IgnorePlugin ( {
58+ resourceRegExp : / ^ n o d e : / , // Ignores all node: protocol imports
59+ } ) ,
5360 ] ,
5461 resolve : {
5562 extensions : [ '.ts' , '.js' ] ,
@@ -76,10 +83,14 @@ module.exports = (env, argv) => {
7683 child_process : false , // Reason for error: 'TypeError: The "original" argument must be of type Function'
7784 async_hooks : false ,
7885 net : false ,
79- // lsp starts itself on the "common" activation path for web/node, so these imports need to be ignored on web
86+ // lsp starts itself on the "common" activation path for web/node, these imports are specific to node and should be ignored
8087 vm : false ,
8188 tls : false ,
8289 glob : false ,
90+ 'original-fs' : false ,
91+ canvas : false ,
92+ bufferutil : false ,
93+ 'utf-8-validate' : false ,
8394 } ,
8495 } ,
8596 optimization : {
You can’t perform that action at this time.
0 commit comments