We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8fcc3e9 commit af3128fCopy full SHA for af3128f
1 file changed
src/index.ts
@@ -29,14 +29,15 @@ const TAG = '[vite-plugin-native]'
29
const loader1 = '@vercel/webpack-asset-relocator-loader'
30
const NativeExt = '.native.cjs'
31
const InteropExt = '.interop.mjs'
32
+// `nativesMap` is placed in the global scope and can be effective for multiple builds.
33
+const nativesMap = new Map<string, {
34
+ built: boolean
35
+ nativeFilename: string
36
+ interopFilename: string
37
+}>
38
39
export default function native(options: NativeOptions): Plugin {
40
const assetsDir = options.assetsDir ??= 'node_natives'
- const nativesMap = new Map<string, {
- built: boolean
- nativeFilename: string
- interopFilename: string
- }>
41
// Webpack output(absolute path)
42
let output: string
43
0 commit comments