fix(many): update dependencies, remove lots of Babel plugins, remove Webpack 4 support#2534
Open
fix(many): update dependencies, remove lots of Babel plugins, remove Webpack 4 support#2534
Conversation
…Webpack 4 support We have removed lots of smaller Babel plugins. In theory these were just doing transforms that are used by old browsers and all features should be supported. make the internal webpack config much more simple Completes INSTUI-4831
matyasf
commented
May 4, 2026
| import 'moment/min/locales' | ||
| ` | ||
| let importExampleIcon = '' | ||
| if (this.props.code.includes('iconExample(')) { |
Collaborator
Author
There was a problem hiding this comment.
This was never used
matyasf
commented
May 4, 2026
| [ | ||
| require('@instructure/ui-babel-preset'), | ||
| { | ||
| coverage: Boolean(process.env.COVERAGE), |
Collaborator
Author
There was a problem hiding this comment.
This ancient flag was used by a Babel plugin called istanbul that generated test coverage for Karma...
matyasf
commented
May 4, 2026
Comment on lines
-28
to
-44
| splitChunks: { | ||
| chunks: 'all' | ||
| }, | ||
| sideEffects: true, | ||
| /** @type {Array<any>} */ | ||
| minimizer: [ | ||
| new TerserWebpackPlugin({ | ||
| parallel: true, | ||
| // sourceMap: true, // this breaks storybook in production env | ||
| terserOptions: { | ||
| mangle: false, | ||
| output: { | ||
| semicolons: false | ||
| } | ||
| } | ||
| }) | ||
| ] |
Collaborator
Author
There was a problem hiding this comment.
Some ancient cryptic optimizations with dubious results...
matyasf
commented
May 4, 2026
Comment on lines
-171
to
-179
| function getNodeEnvConfig() { | ||
| return { | ||
| targets: { | ||
| node: 'current' | ||
| }, | ||
| modules: 'commonjs', | ||
| include: ['transform-classes'] | ||
| } | ||
| } |
Collaborator
Author
There was a problem hiding this comment.
Turns out we were never using the node config since we dont compile Node code with Babel
|
matyasf
commented
May 4, 2026
Comment on lines
-192
to
-198
| include: [ | ||
| // webpack 4 uses acorn 6, which only supports features up to ES2020 | ||
| // have to include this plugin because webpack 4 can't parse the `??` operator | ||
| 'proposal-nullish-coalescing-operator', | ||
| // have to include this plugin because webpack 4 can't parse class properties (like 'static) | ||
| 'proposal-class-properties' | ||
| ] |
Collaborator
Author
There was a problem hiding this comment.
I've removed Webpack 4 support, its barely used by anyone
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
We have removed lots of smaller Babel plugins. In theory these were just doing transforms that are used by old browsers and all features should be supported. make the internal webpack config much more simple
Completes INSTUI-4831
To test: