Skip to content

feat: support multi-entry library build #6884

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: dev
Choose a base branch
from

Conversation

semiaddict
Copy link

@semiaddict semiaddict commented Dec 20, 2021

What kind of change does this PR introduce? (check at least one)

  • Bugfix
  • Feature
  • Code style update
  • Refactor
  • Docs
  • Underlying tools
  • Other, please describe:

Does this PR introduce a breaking change? (check one)

  • Yes
  • No

Other information:

This PR adds support to multi-entry library builds.
It does so by looking at Webpack's Entry Points config and processing the last file in each entry point in resolveLibConfig.

Example usage with vue.config.js:

```js
module.exports = {
    chainWebpack: (config) => {
        config.output.library({
          name: "MyLibrary",
          type: "assign-properties",
        });

        config.entryPoints.clear();
        config.entry("MyLibrary.EntryOne").add("./src/my-polyfill.js").add("./src/entry-one/main.js").end();
        config.entry("MyLibrary.EntryTwo").add("./src/entry-two/main.js").end();
    }
}

Related issue: #3922

@peynman
Copy link

peynman commented Jan 22, 2022

Please merge this

@jincan39
Copy link

no more progress?

@yoyo837
Copy link

yoyo837 commented May 31, 2022

Any update?

@braddialpad
Copy link

Also interested in this. Had to make quite a workaround to get this to work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants