Skip to content

Commit 016e103

Browse files
authored
fix: set inpage ouptut to iife (#110)
resolve #103 there's a `var _=...` in the `inpage.js` output and it conflicts with google map this PR wraps the output in a self exec function to avoid that for unknown reason update `rollupOptions.output.format` to `iife` does not work
1 parent 618433e commit 016e103

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

vite.config.inpage.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ export default defineConfig({
2222
name: 'try-catch',
2323
generateBundle(_, context) {
2424
Object.values(context).forEach((bundle: any) => {
25-
bundle.code = `try{${bundle.code}}catch{}`
25+
bundle.code = `(function(){try{${bundle.code}}catch{}}())`
2626
})
2727
},
2828
},

0 commit comments

Comments
 (0)