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

Webpack 5 upgrade (continued) #35

Closed
wants to merge 2 commits into from

Conversation

43081j
Copy link

@43081j 43081j commented Mar 29, 2021

This is continuing where #34 left off as justin didn't have time.

I will try pick it up and see where I get to.

Related:

cc @justinfagnani @sokra

@43081j 43081j marked this pull request as draft March 29, 2021 17:28

// Don't mark an import as built in if it is the name of the package itself
// eg. `events`
if (builtInNode[packageName]) {
Copy link
Author

Choose a reason for hiding this comment

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

@pastelsky this has since changed in webpack. we now set node: false to tell it not to polyfill any builtins. but losing this if concerns me, would you be able to explain what the intention of this whole block was (builtInNode) and if disabling it entirely will suffice?

},
},
}),
'...',
// @ts-ignore: Appears that the library might have incorrect definitions
Copy link
Author

Choose a reason for hiding this comment

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

zoobestik/csso-webpack-plugin#18 will fix this if they publish a new version

new VueLoaderPlugin(),
new MiniCssExtractPlugin({
// Options similar to the same options in webpackOptions.output
// both options are optional
filename: '[name].bundle.css',
chunkFilename: '[id].bundle.css',
}),
...(debug ? [new WriteFilePlugin()] : []),
Copy link
Author

Choose a reason for hiding this comment

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

i don't fully understand what this was doing, another for @pastelsky. it was writing the output to disk during watch mode i guess but to what end? the plugin doesn't support webpack 5 so im wondering/hoping we can drop it

@pastelsky
Copy link
Owner

@43081j I was working on this in parallel as well. I'm nearly done getting this to work with webpack 5 sans typecheck. We wpuld need to do some performance testing and test functions other than getPackageStats to confirm if things are working fine.

Let me push changes to a next branch tomorrow.

@43081j
Copy link
Author

43081j commented Mar 29, 2021

sure, ill pause for now then. let me know if there's anything i've mentioned or referenced here thats still of any help.

@43081j
Copy link
Author

43081j commented Mar 31, 2021

@pastelsky DefinitelyTyped/DefinitelyTyped#52044 has merged now so once they publish it, you won't need to cast mini-css-extract-plugin as any anymore (types will be webpack5 compatible)

webpack/webpack#13016 has also been merged so you can import StatsAsset properly

csso plugin has also been published under 2.x beta now which sorts the v5 types

@43081j
Copy link
Author

43081j commented May 17, 2021

@pastelsky did you ever get anywhere with this?

@43081j
Copy link
Author

43081j commented Aug 10, 2023

closing since i guess it was done elsewhere (or if not, this branch is a fossil by now anyway)

@43081j 43081j closed this Aug 10, 2023
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.

3 participants