小编Lan*_*ino的帖子

当我不进行代码分割时,为什么 Rollup 会抱怨代码分割?

output我的只有一项rollup.config.js

export default {
  input: './src/Index.tsx',
  output: {
    dir: './myBundle/bundle',
    format: 'iife',
    sourcemap: true,
  },
  plugins: [
    typescript(),
    nodeResolve(),
    commonjs(),
    babel(),
    json(),
    terser(),
  ],
};
Run Code Online (Sandbox Code Playgroud)

为什么 Rollup 指责我进行代码分割? [!] Error: UMD and IIFE output formats are not supported for code-splitting builds.

rollup iife typescript code-splitting

9
推荐指数
1
解决办法
6718
查看次数

标签 统计

code-splitting ×1

iife ×1

rollup ×1

typescript ×1