We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent aebf93c commit decac63Copy full SHA for decac63
src/index.ts
@@ -11,6 +11,8 @@ export const unpluginFactory: UnpluginFactory<Options | undefined> = options =>
11
// return id.endsWith('main.ts')
12
// },
13
webpack(compiler) {
14
+ if (compiler.options.mode === 'production')
15
+ return
16
const alias = compiler.options?.resolve?.alias
17
const aliasList: AliasOptions & Alias[] = Object.keys(alias ?? {}).map(k => ({
18
find: k,
@@ -20,6 +22,8 @@ export const unpluginFactory: UnpluginFactory<Options | undefined> = options =>
20
22
},
21
23
vite: {
24
configResolved(config: ResolvedConfig) {
25
+ if (config.env.PROD)
26
27
unpluginAutoExport(options!, config.resolve.alias)
28
29
0 commit comments