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

build: update webpack to v5 #519

Merged
merged 2 commits into from
Nov 7, 2023

Conversation

shadowusr
Copy link
Member

@shadowusr shadowusr commented Nov 3, 2023

What's done?

  • Updated webpack to 5 and all of its loaders and plugins to latest versions
  • Updated e2e tests configs

@@ -48,8 +53,17 @@ module.exports = {
},
{
test: /\.(png|woff|woff2|eot|ttf|svg)$/,
loader: 'url-loader'
type: 'asset',
Copy link
Member Author

Choose a reason for hiding this comment

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

Рекомендуется заменить url-loader на asset modules: https://webpack.js.org/guides/asset-modules/

@@ -87,9 +101,9 @@ module.exports = {
template: 'template.html',
chunks: ['gui']
}),
new HtmlWebpackIncludeAssetsPlugin({
new HtmlWebpackTagsPlugin({
Copy link
Member Author

Choose a reason for hiding this comment

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

Плагин обновился и поменял свое название.

@@ -13,11 +13,6 @@ module.exports = merge(
minimize: false
},
devtool: 'eval-source-map',
devServer: {
Copy link
Member Author

Choose a reason for hiding this comment

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

Убрал, т.к. у нас веб сервер не использовался

@shadowusr shadowusr force-pushed the users/shadowusr/HERMIONE-1004.try-webpack-5 branch from 57d0b0b to 8dce5b1 Compare November 3, 2023 12:12
extensions: ['.js', '.jsx', '.ts', '.tsx']
extensions: ['.js', '.jsx', '.ts', '.tsx'],
fallback: {
crypto: require.resolve('crypto-browserify'),
Copy link
Member Author

Choose a reason for hiding this comment

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

webpack 5 перестал автоматом включать полифиллы для node.js модулей, нужно руками прописывать их в конфиге.

@shadowusr shadowusr merged commit 5fd52d4 into master Nov 7, 2023
5 checks passed
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