Skip to content

Conversation

@StyleT
Copy link
Contributor

@StyleT StyleT commented Jul 8, 2021

Hi!
This tiny change makes externals with custom type specified work correctly with "system" library target.

Now they only work with "umd" library target because of these lines:

const modules = chunkGraph
.getChunkModules(chunk)
.filter(
m =>
m instanceof ExternalModule &&
(m.externalType === "umd" || m.externalType === "umd2")
);
let externals = /** @type {ExternalModule[]} */ (modules);

I see similar issue with AMD bundle type too, but let's start with System.js first ;)

What kind of change does this PR introduce?

bugfix

Did you add tests for your changes?

yes

Does this PR introduce a breaking change?

I believe not :)

What needs to be documented once your changes are merged?

Nothing :)

@webpack-bot
Copy link
Contributor

For maintainers only:

  • This needs to be documented (issue in webpack/webpack.js.org will be filed when merged)
  • This needs to be backported to webpack 4 (issue will be created when merged)

@StyleT
Copy link
Contributor Author

StyleT commented Jul 8, 2021

Dear maintainers - it would be great to make & release similar fix for Webpack 4. So if you don't mind, I'll sent PR to v4 branch. This will simplify life for me A LOT.

@StyleT
Copy link
Contributor Author

StyleT commented Jul 9, 2021

@sokra Hi! I see you're trying to fix the CI being unstable sometimes. I believe here tests got failed not because of the changes but rather CI issues. Could you take a look?

@sokra sokra merged commit 6fe0bac into webpack:main Jul 12, 2021
@sokra
Copy link
Member

sokra commented Jul 12, 2021

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants