Giter Site home page Giter Site logo

Comments (4)

fi3ework avatar fi3ework commented on August 17, 2024 2

The root cause is terser/html-minifier-terser#177.

As for this won't happen in Vite or webpack5 builder, is because html-minify options here will be merged with Rsbuild's default options(https://github.com/rspack-contrib/rsbuild-plugin-html-minifier-terser/blob/38897bccc4330f9191e5d7c9ea54f8e7f5f76015/src/index.ts#L56-L68), which enabled minifyCSS and triggered the issue above.

To resolve the problem, we should simply align with webpack builder's config (https://github.com/storybookjs/storybook/blob/bbfdf5897e399f65368ca2ed14930b912e466a25/code/builders/builder-webpack5/src/preview/iframe-webpack.config.ts#L184-L189) strictly, stop from merging with the default options in rsbuild-plugin-html-minifier-terser.

from storybook-rsbuild.

tounsoo avatar tounsoo commented on August 17, 2024 1

Just updated to the 0.0.11 and confirmed it fixed this issue! Thank you so much for quick response and release 🙏

image

from storybook-rsbuild.

fi3ework avatar fi3ework commented on August 17, 2024

Could you provide a minimal reproduction. I tried to visit https://github.com/tounsoo/margin-ds, but it seems to be a private repository at the moment.

from storybook-rsbuild.

fi3ework avatar fi3ework commented on August 17, 2024

Confirmed. The code on the left side is the source code, the selector is nested in sb-errordisplay, whereas in the right output, no parent selector anymore.

image

from storybook-rsbuild.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.