vite icon indicating copy to clipboard operation
vite copied to clipboard

多入口打包时,怎样根据input去自定义输出模块类型。

Open KipSong opened this issue 4 years ago • 2 comments

Clear and concise description of the problem

input: { index: 'index.html', // index background: 'chrome-settings/background.ts', // background 想要 umd iife 类型 contentScript: 'chrome-settings/contentScript.ts', // contentScript 想要 esm 类型 options: resolve(__dirname, 'options/index.html'), // options }, output: { chunkFileNames: '[name].[hash].js', assetFileNames: '[name].[hash].[ext]', entryFileNames: '[name].js', dir: 'dist', },

background 想要 umd iife 类型 contentScript 想要 esm 类型

如何进行设置

Suggested solution

有解决方案么,各位大佬。

Alternative

No response

Additional context

No response

Validations

KipSong avatar Dec 31 '21 09:12 KipSong

I am facing same problem also

slmyer avatar Dec 31 '21 10:12 slmyer

I am facing same problem also

slmyer avatar Dec 31 '21 10:12 slmyer