Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings
webpack

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Terser plugin Minimizer doesn't return result#17877

Unanswered
normancarcamo asked this question inQ&A
Discussion options

Bug report

What is the current behavior?

Error when compiling for production using terser options

ERRORin ./javascripts/webpack/main.js from Terser pluginMinimizer doesn't return result
{optimization:{minimize:true,minimizer:[newTerserPlugin({minify:TerserPlugin.uglifyJsMinify,extractComments:false,terserOptions:{keep_classnames:true,keep_fnames:true,},}),],},}

If the current behavior is a bug, please provide the steps to reproduce.

What is the expected behavior?

It should compile for production without errors.

Other relevant information:

➜ ./node_modules/.bin/webpack --version

System:
OS: macOS 11.4
CPU: (8) x64 Intel(R) Core(TM) i7-4770HQ CPU @ 2.20GHz
Memory: 1.78 GB / 16.00 GB
Binaries:
Node: 18.18.2 - ~/.nvm/versions/node/v18.18.2/bin/node
Yarn: 1.22.21 - ~/.nvm/versions/node/v18.18.2/bin/yarn
npm: 9.8.1 - ~/.nvm/versions/node/v18.18.2/bin/npm
Browsers:
Brave Browser: 103.1.41.96
Chrome: 119.0.6045.159
Safari: 14.1.1
Packages:
babel-loader: ^9.1.3 => 9.1.3
clean-webpack-plugin: ^4.0.0 => 4.0.0
css-loader: ^6.8.1 => 6.8.1
eslint-loader: ^1.7.1 => 1.9.0
eslint-webpack-plugin: ^4.0.1 => 4.0.1
sass-loader: ^13.3.2 => 13.3.2
style-loader: ^3.3.3 => 3.3.3
terser-webpack-plugin: ^5.3.9 => 5.3.9
uglifyjs-webpack-plugin: ^1.2.4 => 1.2.4
webpack: ^5.88.2 => 5.89.0
webpack-cli: ^5.1.4 => 5.1.4
webpack-dev-server: ^4.15.1 => 4.15.1
webpack-merge: ^5.10.0 => 5.10.0

You must be logged in to vote

Replies: 1 comment 7 replies

Comment options

Please provide reproducible test repo, maybe you have broken JS syntax...

You must be logged in to vote
7 replies
@varit05
Comment options

I faced this issue and came across this thread.

I've created a testrepo where this is still producible.

I have tried the steps from the webpackdocumentation

Happy to help in any capacity.

@alexander-akait
Comment options

@varit05 I see, the problem is ``deadCode is not a supported option by uglify-js, WIP on fix to output better errors here

@alexander-akait
Comment options

@varit05 There is a fix -webpack/terser-webpack-plugin#641, release will be soon

@varit05
Comment options

@alexander-akait Thanks for the quick resolution, I really appreciate it.

@varit05
Comment options

I’m happy to confirm that the plugin now provides a clearer error with theterserOptions. I have updated therepo and played with the differentterserOptions.

Thank you@alexander-akait for your prompt response.

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Category
Q&A
Labels
None yet
4 participants
@normancarcamo@alexander-akait@varit05@nullstd
Converted from issue

This discussion was converted from issue #17828 on December 19, 2023 15:13.


[8]ページ先頭

©2009-2025 Movatter.jp