Skip to content
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

Update webpack #12135

Merged
merged 1 commit into from
Mar 23, 2021
Merged

Update webpack #12135

merged 1 commit into from
Mar 23, 2021

Conversation

tschaub
Copy link
Member

@tschaub tschaub commented Mar 22, 2021

This branch reworks things to work with webpack@5 and the latest rollup plugins.

The examples/webpack/example-builder.js plugin needed to be updated to conform with the new webpack plugin API.

The tasks/serialize-workers.js script needed to be updated to work with the latest babel plugin for rollup.

I've confirmed that examples are properly built and served with npm start, that the production build of the examples with npm run build-examples look good, that the legacy build with npm run build-legacy still works, and that npm run build-package still works.

The examples take about 20 seconds longer to build in production mode compared to building with webpack 4 (building examples in dev mode takes about 5 seconds longer). I think it is a known issue that webpack 5 is slower (webpack/webpack#12102). Maybe we can expect improvements in future releases.

I don't think we have to migrate things right now if we don't want to. But I wanted to see what was involved in updating our plugins.

Closes #12133.

Copy link
Member

@ahocevar ahocevar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it makes sense to upgrade. Thanks for the investigation, and feel free to merge.

@tschaub tschaub merged commit 22ff477 into openlayers:main Mar 23, 2021
@tschaub tschaub deleted the update-webpack branch March 23, 2021 00:03
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.

2 participants