Skip to content

Build multiple UMD files from multiple entries #2935

@moog16

Description

@moog16

Documentation Is:

  • Missing
  • Needed
  • Confusing
  • Not Sure?

Please Explain in Detail...

I have a library of components. Let's say I have

  • packageA
    • index.js
  • packageB
    • index.js

I'd like this to be on configuration:

export default [
	{
		input: ['packages/A/index.js', 'packages/B/index.js'],
		output: {
			name: '[name]Bundle',
			file: '[name].umd.js',
			format: 'umd'
		}
	},
];

I expect this to output an A/index.umd.js and a B/index.umd.js file, but I get [!] Error: UMD and IIFE output formats are not supported for code-splitting builds.. If I change format --> esm, cjs, etc. it works as expected. I couldn't find any documentation to achieve this with iife/UMD.

I also went on gitter, but didn't hear from anyone.

Your Proposal for Changes

Some documentation to how to build multiple umd files from multiple entry files.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions