Skip to content

fix(many): update dependencies, remove lots of Babel plugins, remove Webpack 4 support#2534

Open
matyasf wants to merge 1 commit intomasterfrom
upgrade_dependencies
Open

fix(many): update dependencies, remove lots of Babel plugins, remove Webpack 4 support#2534
matyasf wants to merge 1 commit intomasterfrom
upgrade_dependencies

Conversation

@matyasf
Copy link
Copy Markdown
Collaborator

@matyasf matyasf commented May 4, 2026

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:

  • Check the docs app for any errors, missing stuff
  • check the code for any accidentally removed stuff

…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 matyasf requested review from HerrTopi and balzss May 4, 2026 14:55
@matyasf matyasf self-assigned this May 4, 2026
import 'moment/min/locales'
`
let importExampleIcon = ''
if (this.props.code.includes('iconExample(')) {
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

This was never used

[
require('@instructure/ui-babel-preset'),
{
coverage: Boolean(process.env.COVERAGE),
Copy link
Copy Markdown
Collaborator Author

@matyasf matyasf May 4, 2026

Choose a reason for hiding this comment

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

This ancient flag was used by a Babel plugin called istanbul that generated test coverage for Karma...

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
}
}
})
]
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Some ancient cryptic optimizations with dubious results...

Comment on lines -171 to -179
function getNodeEnvConfig() {
return {
targets: {
node: 'current'
},
modules: 'commonjs',
include: ['transform-classes']
}
}
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Turns out we were never using the node config since we dont compile Node code with Babel

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 4, 2026

PR Preview Action v1.8.1

QR code for preview link

🚀 View preview at
https://instructure.design/pr-preview/pr-2534/

Built to branch gh-pages at 2026-05-04 14:59 UTC.
Preview will be ready when the GitHub Pages deployment is complete.

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'
]
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

I've removed Webpack 4 support, its barely used by anyone

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.

1 participant