Comments (15)
Can you install [email protected] and see if it works?
from plugins.
@shellscape The bug remains when setting up the project with lerna.
from plugins.
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.
It's because of d49e257. It has a problem with sideEffects and filter. I will open an issue soon.
from plugins.
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.
5.0.3 worked! I'll use that for now, thanks!
from plugins.
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.
@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.
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.
@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.
@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.
- 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.
@dkumor I guess you should keep this issue open because of the difference between rollup and webpack on resolving "*.css" :D
from plugins.
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.
@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)
- @rollup/plugin-alias entries is not work when use customResolver HOT 1
- [@rollup/plugin-eslint] New flat config `eslint.config.js` is not recognized HOT 1
- [@rollup/plugin-esm-shim] Shim inserted incorrectly if source file has `import` in comment HOT 1
- [@rollup/plugin-node-resolve] confusion about what this plugin does HOT 2
- How to tell `--configPlugin` to use specific `tsconfig`? HOT 5
- [@rollup/plugin-node-resolve] resolving package.json exports/imports arrays HOT 1
- Source URLs in generated source map are wrong when `composite` is enabled in tsconfig.json
- requireReturnsDefault: "auto" results in an incorrect bundle for some libraries
- [@rollup/plugin-alias] Allow to configure alias based on entry point
- 在SCSS中如何替换Var变量
- Allow @rollup/plugin-virtual to be a function that takes a module ID
- [@rollup/plugin-tpescript] Rollup does not use `paths` in `rollup.config.ts`
- [@rollup/plugin-typescript] allowImportingTsExtensions warning
- [@rollup/plugin-tpescript] Rollup does not get `module` and `moduleResolution` settings from extended `tsconfig.json`
- [@rollup/plugin-json] won't process files without json suffix HOT 4
- CommonJS plugin version bump to 26.0.0 causes build issue HOT 4
- Confusing explanation in @rollup/plugin-typescript's README
- [@rollup/plugin-swc] leads to unusable bundle in combination with [@rollup/plugin-commonjs] and [@rollup/plugin-node-resolve]
- I don't know if this is a mistake
- Wasm plugin to support latest ESM Integration & Source Phase Imports
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from plugins.