Closed plainnany closed 8 months ago
Mybe the following code is better.
record.dynaimc = {
importee: [],
- runtimeName: `__matchRequireRuntime${counter}__`,
+ runtimeName: `__matchRequireRuntime${counter++}__`,
runtimeFn: '', // to be immediately set
}
Mybe the following code is better.
record.dynaimc = { importee: [], - runtimeName: `__matchRequireRuntime${counter}__`, + runtimeName: `__matchRequireRuntime${counter++}__`, runtimeFn: '', // to be immediately set }
@yejimeiming
counter++
may be used many times,consider usingconst counter3 = counter++
?
fix: issue27 demo: https://github.com/plainnany/vite-plugin-commonjs/tree/dynamic-demo/example