mirror of
https://github.com/directus/directus.git
synced 2026-01-25 12:07:56 -05:00
Silence prefer builtins and circular dependency warnings when building extensions (#18366)
* Silence prefer builtins warning * Silence circular dependency warning if only external files are involved * Add changeset
This commit is contained in:
committed by
GitHub
parent
76ae228c53
commit
3ff71cc34a
5
.changeset/chilly-pugs-pay.md
Normal file
5
.changeset/chilly-pugs-pay.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@directus/extensions-sdk': patch
|
||||
---
|
||||
|
||||
Silenced prefer builtins and circular dependency warnings when building extensions
|
||||
@@ -591,7 +591,7 @@ function getRollupOptions({
|
||||
languages.includes('typescript') ? esbuild({ include: /\.tsx?$/, sourceMap: sourcemap }) : null,
|
||||
mode === 'browser' ? styles() : null,
|
||||
...plugins,
|
||||
nodeResolve({ browser: mode === 'browser' }),
|
||||
nodeResolve({ browser: mode === 'browser', preferBuiltins: mode === 'node' }),
|
||||
commonjs({ esmExternals: mode === 'browser', sourceMap: sourcemap }),
|
||||
json(),
|
||||
replace({
|
||||
@@ -602,6 +602,11 @@ function getRollupOptions({
|
||||
}),
|
||||
minify ? terser() : null,
|
||||
],
|
||||
onwarn(warning, warn) {
|
||||
if (warning.code === 'CIRCULAR_DEPENDENCY' && warning.ids?.every((id) => /\bnode_modules\b/.test(id))) return;
|
||||
|
||||
warn(warning);
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user