Giter Club home page Giter Club logo

Comments (15)

hiendv avatar hiendv commented on July 28, 2024 3

Can you install [email protected] and see if it works?

from plugins.

hiendv avatar hiendv commented on July 28, 2024 3

@shellscape The bug remains when setting up the project with lerna.

from plugins.

dkumor avatar dkumor commented on July 28, 2024 3

oops, sorry - not plugin-replace, but node-resolve (edited comment to fix)! Thanks for your help in figuring out this problem @hiendv!

In general, I guess my issue can be boiled down to the fact that plugin-node-resolve is unable to import the explicitly referenced css if it is outside of sideEffects - and it does not notify of the error. The current behavior of silently failing caused me quite a bit of confusion!

from plugins.

hiendv avatar hiendv commented on July 28, 2024 1

It's because of d49e257. It has a problem with sideEffects and filter. I will open an issue soon.

from plugins.

mjsgreen01 avatar mjsgreen01 commented on July 28, 2024 1

I had a similar issue with @rollup/plugin-node-resolve where my nested CSS files were not being included in the output bundle.

Fixed by changing my package.json's sideEffects field to "sideEffects": [ "**/*.css", "**/*.scss" ],

from plugins.

dkumor avatar dkumor commented on July 28, 2024

5.0.3 worked! I'll use that for now, thanks!

from plugins.

shellscape avatar shellscape commented on July 28, 2024

Hey folks (this is a canned reply, but we mean it!). Thanks to everyone who participated in this issue. We're getting ready to move this plugin to a new home at https://github.com/rollup/plugins, and we have to do some spring cleaning of the issues to make that happen. We're going to close this one, but it doesn't mean that it's not still valid. We've got some time yet before the move while we resolve pending Pull Requests, so if this issue is still relevant, please @ me and I'll make sure it gets transferred to the new repo. 🍺

from plugins.

shellscape avatar shellscape commented on July 28, 2024

@hiendv @dkumor I've finally got the bandwidth to take a look at this. Can either of you break this down into a minimal reproduction using a repo or the repl? If possible, without using the postcss plugin.

from plugins.

dkumor avatar dkumor commented on July 28, 2024

While I haven't looked into why the issue is happening, so I'm not sure how to reproduce without postcss, I have recreated the minimal reproduction above (with postcss): https://repl.it/repls/EcstaticFaithfulPolygon

As mentioned above, the issue is not present in 5.0.3.

from plugins.

hiendv avatar hiendv commented on July 28, 2024

@dkumor's problem is caused by the vuetify sideEffects setting.

  • vuetify intends to mark sideEffects for node_modules/vuetify/**/*.css
  • @rollup/plugin-node-resolve reads it as node_modules/vuetify/*.css
  • The actual file is located at node_modules/vuetify/dist/vuetify.css

You can try modifying node_modules/vuetify/package.json sideEffects to */*.css and see if it works.

Mine is another problem with lerna symlink and stuff. I'm trying to reproduce asap.

from plugins.

dkumor avatar dkumor commented on July 28, 2024

@hiendv yes, looks like that was the issue! If I understand correctly, this means there are two bugs here:

  • vuetify has incorrect sideEffects setting for css files, which needs to be fixed on their end.
  • plugin-node-resolve silently fails when a file is loaded that is not in sideEffects, without giving any indication that something went wrong. I'm not sure why the file needs to be in sideEffects to be resolved when explicitly referenced, but if this is intentional, would be nice to get an error message.

Is my understanding correct?

from plugins.

hiendv avatar hiendv commented on July 28, 2024

@dkumor

  • Not really vuetify problem because the translation of sideEffects vary between rollup and webpack. It works fine when bundling with webpack I believe.
  • I don't have any idea about plugin-replace but I find it understandable to mark css files as "side-effects" so the tree-shaking works correctly.

from plugins.

hiendv avatar hiendv commented on July 28, 2024

@dkumor I guess you should keep this issue open because of the difference between rollup and webpack on resolving "*.css" :D

from plugins.

shellscape avatar shellscape commented on July 28, 2024

Hey folks, this one has gone quite stale. We're going to close for housekeeping but we'd happily review any PRs that pop up to resolve this issue.

from plugins.

mjangir avatar mjangir commented on July 28, 2024

@shellscape The bug remains when setting up the project with lerna.

@dkumor's problem is caused by the vuetify sideEffects setting.

  • vuetify intends to mark sideEffects for node_modules/vuetify/**/*.css
  • @rollup/plugin-node-resolve reads it as node_modules/vuetify/*.css
  • The actual file is located at node_modules/vuetify/dist/vuetify.css

You can try modifying node_modules/vuetify/package.json sideEffects to */*.css and see if it works.

Mine is another problem with lerna symlink and stuff. I'm trying to reproduce asap.

I've the same problem with lerna. Did you find a solution for that? Thanks.

from plugins.

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.