-
-
Notifications
You must be signed in to change notification settings - Fork 81
Use this.emitFile to generate css files #72
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
This PR would be quite useful for a project I'm working on. I'm using Gulp with Rollup, and using |
@elgertam I believe rollup can fully replace gulp, is there a specific reason you're using them together? |
@shirotech TL;DR: Gulp is very simple yet powerful, and is also debuggable. Rollup has a bit more complexity, but does code bundling very well. I find that Gulp makes the build process very simple and understandable both to my team and me. I can commit a Rollup is superb at orchestrating the build pipeline. But since it favors configuration slightly more than code (though not to the degree of, say, Webpack, which invokes magic to the point of sorcery), I find Rollup with a bunch of plugins a bit harder to navigate. While I am capable of digging through documentation and code for arbitrary plugins in order to figure out why my build isn't exactly what I expect, this process has a bit more friction in Rollup as the number of plugins increase. Also, if I have some task or process I wish to use that has not been implemented as a Rollup plugin, it's a bit harder for me to roll something myself, since the interface Rollup provides is quite a bit more complex than that for Gulp. (The complexity of Rollup's interface seems to be this PR's raison d'être.) I strongly prefer my build code (and my production code) to be as simple as possible, but not simpler. I find Gulp + Rollup are a good mix. |
@shirotech I should add that regardless of my preferences, this PR fixes a fairly significant defect in the plugin. The status quo behavior would be a bit unexpected to me even if I was using Rollup without Gulp. I hope it's merged soon. |
@elgertam sorry I was just curious, I see that makes sense now, I do admit the setup for rollup can be complex, I've spent countless hours just to make it simple to the point where I gave up relying on 3rd party plugins and rolling our own versions. Back on topic, yes hope this can be merged soon. |
@shirotech I'd love to get this merged. Can you take a look at why the tests are failing? |
@shirotech the fix to the test is relatively easy. You need to change the three calls to |
I fixed those tests, this looks good now. |
Is there a way to do this that's also compatible with older versions of Rollup? If not, since this is a breaking change anyway, is this now using the latest version of Rollup's asset handling APIs, and not one of the interim ones? |
Apparently this repo is using a version below 1? I must be missing something, this doesn't seem possible. |
Or did it get updated in this PR? |
It did. Ignore me. |
I believe |
The tests for this change fail with any version of Rollup less than 1.19.2
I just tested. This PR only works with Rollup |
The change in this PR is breaking to 100% of users. Something needs to be done to notify them. For example, if there is a directory separator or if the directory to write to doesn't exist, warn that paths are now relative. |
Fixes #71