File tree Expand file tree Collapse file tree 1 file changed +19
-14
lines changed Expand file tree Collapse file tree 1 file changed +19
-14
lines changed Original file line number Diff line number Diff line change @@ -86,20 +86,25 @@ export default defineConfig({
8686 // }
8787 // });
8888
89- // config.ignoreWarnings = [
90- // {
91- // // Ignore warnings for dependencies that do not ship with a source map.
92- // // This is because we cannot do anything about our dependencies.
93- // module: /node_modules/,
94- // message: /Failed to parse source map/
95- // },
96- // {
97- // // Ignore the warnings that occur because js-slang uses dynamic imports
98- // // to load Source modules
99- // module: /js-slang\/dist\/modules\/loader\/loaders.js/,
100- // message: /Critical dependency: the request of a dependency is an expression/
101- // }
102- // ];
89+ config . ignoreWarnings = [
90+ ( warning : any ) => {
91+ // Ignore the warnings that occur because js-slang uses dynamic imports
92+ // to load Source modules
93+ const moduleName = warning . moduleDescriptor ?. name
94+ if ( ! moduleName ) return false
95+
96+ if ( ! / j s - s l a n g \/ d i s t \/ m o d u l e s \/ l o a d e r \/ l o a d e r s .j s / . test ( moduleName ) ) return false
97+ return / C r i t i c a l d e p e n d e n c y : t h e r e q u e s t o f a d e p e n d e n c y i s a n e x p r e s s i o n / . test ( warning . message )
98+ }
99+
100+ // {
101+ // // Ignore warnings for dependencies that do not ship with a source map.
102+ // // This is because we cannot do anything about our dependencies.
103+ // module: /node_modules/,
104+ // message: /Failed to parse source map/
105+ // },
106+ // [
107+ ] ;
103108
104109 // config.plugins = [
105110 // ...config.plugins,
You can’t perform that action at this time.
0 commit comments