question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Webpack executor minimizes classnames when optimization: true

See original GitHub issue

Current Behavior

Webpack executor minimizes classnames when optimization is set to true. It was fixed in this #8537 This happens since normalize-options.ts transforms optimization option from true to {scripts: true, styles: true}.

Expected Behavior

Optimization options should work as intended in #8537

Environment

Node : 16.13.0 OS : linux x64 yarn : 1.22.17

nx : 15.0.0 @nrwl/angular : Not Found @nrwl/cypress : 15.0.0 @nrwl/detox : Not Found @nrwl/devkit : 15.0.0 @nrwl/esbuild : Not Found @nrwl/eslint-plugin-nx : 15.0.0 @nrwl/expo : Not Found @nrwl/express : 15.0.0 @nrwl/jest : 15.0.0 @nrwl/js : 15.0.0 @nrwl/linter : 15.0.0 @nrwl/nest : 15.0.0 @nrwl/next : 15.0.0 @nrwl/node : 15.0.0 @nrwl/nx-cloud : 14.7.0 @nrwl/nx-plugin : 15.0.0 @nrwl/react : 15.0.0 @nrwl/react-native : Not Found @nrwl/rollup : 15.0.0 @nrwl/schematics : Not Found @nrwl/storybook : 15.0.0 @nrwl/web : 15.0.0 @nrwl/webpack : 15.0.0 @nrwl/workspace : 15.0.0 typescript : 4.8.4

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:3
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
jaysoocommented, Oct 19, 2022

Yeah this is intended since optimization for styles means minifying the class names. We don’t recommend turning this off for production, but you want to you can pass { scripts: true, styles: false } in your project.json file.

0reactions
mklinkecommented, Dec 7, 2022

Introduced in https://github.com/nrwl/nx/pull/11966/files#diff-891ed1c6cd733eaa28d9f44efe10195ee093b21f3fec16330217ef78d21799cdR28-R34

I found this issue while trying to upgrade from 14.7.5 to the latest 14.x minor version (can’t upgrade to 15.x yet due to some Angular dependencies).

It looks like the referenced commit was pushed briefly after 14.7.5, but hasn’t been fixed on the 14.8.x branch.

Is there a chance the fix will be applied to that branch, too? I’ve looked into the Git history and it seems like most fixes for 15.x have been almost immediately cherry-picked to 14.8.x.

Is there any particular reason this hasn’t been cherry-picked to 14.8.x?

Just trying to understand. Thanks in advance for any answer.

EDIT: Just realized that Angular 15 support was introduced in 15.2.0, so I’ll try upgrading to 15.1.1 for now.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Keep functions and classes names on optimized build with ...
I'm trying to configure my Angular 8 project build to keep functions and classes names (I need my classes names to use reflexion...
Read more >
How to Make Better Optimization With Webpack and ... - Medium
Overview. Hey Guys , I want to share my experience and R&D about how to config better webpack in the production in the...
Read more >
"Fossies" - the Fresh Open Source Software Archive
As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) TypeScript source code syntax highlighting...
Read more >
SearchView - Android Developers
android:duplicateParentState, When this attribute is set to true, the view gets its drawable state (focused, pressed, etc.) from its direct parent rather ...
Read more >
Changelog Archive - Jenkins
(pull 6382); Fail fast when the frontend sends an invalid class name. ... Optimize access control checks affecting (at least) Pipeline node steps....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found