-
Notifications
You must be signed in to change notification settings - Fork 19
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
fix: use this.emitFile() API from rollup #666
Conversation
739cfbd
to
99a778d
Compare
Travis tests have failedHey @tivac, Node.js: 8npm test -- --ci
TravisBuddy Request Identifier: 827b1a20-d462-11e9-847a-07722ef8bbdd |
- First value
+ Second value
@@ -173,11 +173,11 @@
return {
c() {
div = createElement("div");
div.textContent = "Hi";
- div.className = "mc8c3b9f40_b mc7c0d2c82_a";
+ div.className = "mc8c3b9f40_c mc7c0d2c82_a";
},
m(target, anchor) {
insert(target, div, anchor);
}, That test claiming to have no diff now is very suspicious & broken, that line should definitely be changing after the |
This broke in between Rollup seems like it's doing the right thing here, which is only transforming the Crap. |
Found the specific change that broke this: rollup/rollup@v1.20.3...v1.21.0#diff-093a6241a0003efb710688c0b3332f53L183-R186 invalidate(id: string, isTransformDependency: boolean) {
this.invalidated = true;
if (isTransformDependency) {
- (this.cache.modules as ModuleJSON[]).forEach(module => {
- if (!module.transformDependencies || module.transformDependencies.indexOf(id) === -1)
- return;
+ for (const module of this.cache.modules) {
+ if (module.transformDependencies.indexOf(id) === -1) return;
// effective invalidation
module.originalCode = null as any;
- });
+ }
}
this.watcher.invalidate(id);
} When this code was changed from I need to report this to rollup (& maybe send a PR since the fix is trivial). |
Bug: rollup/rollup#3111 |
Which fixes the weird rebuild issue I found.
Codecov Report
@@ Coverage Diff @@
## master #666 +/- ##
==========================================
+ Coverage 99.12% 99.12% +<.01%
==========================================
Files 45 45
Lines 1138 1149 +11
Branches 173 177 +4
==========================================
+ Hits 1128 1139 +11
Misses 10 10
Continue to review full report at Codecov.
|
Description
Using
this.emitFile()
for all file emission from the rollup plugin.Motivation and Context
this.emitFile()
is the correct future-proof way to emit files from rollup plugins.this.emitAsset()
andthis.emitChunk()
are being deprecated, and it was never really supported to add files directly to the bundle the way they were.How Has This Been Tested?
Normal test suite
Types of changes
Checklist: