Skip to content

Commit 42a6bb1

Browse files
Merge pull request #45 from derekdavenport/main
use config warning handler if it exists
2 parents 5ee4198 + 5856ee4 commit 42a6bb1

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/index.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,8 @@ export const nodePolyfills = (options: PolyfillOptions = {}): Plugin => {
199199
build: {
200200
rollupOptions: {
201201
onwarn: (warning, rollupWarn) => {
202-
handleCircularDependancyWarning(warning, rollupWarn)
202+
const warningHandler = _config.build?.rollupOptions?.onwarn ?? rollupWarn
203+
handleCircularDependancyWarning(warning, warningHandler)
203204
},
204205
plugins: [
205206
{

0 commit comments

Comments
 (0)