Comments (6)
Thanks. No need for a more isolated test, I reckon this is small enough to work with - will look into it as soon as I get a chance. Not immediately sure what's causing it but am sure it's fixable (he said confidently...)
from rollup.
@mbostock Turns out I'm struggling to reproduce this - all the d3-shape tests are passing for me, and the statement ordering looks to be correct. Has anything changed since this issue was opened?
from rollup.
Yeah, there’s a workaround I’ve been using.
I’ll try to pare down a standalone test case.
from rollup.
Here ya go:
https://gist.github.com/mbostock/bc1ffc78c3f933eff312
Note that if you reverse the order of statements in index.js, the test passes!
from rollup.
Ah, I see what's going on here. The (new Foo)
line causes the Foo
definition to be included, which means also including Foo.prototype.test = ...
and (because rollup can't know that Object.create
doesn't modify Foo.prototype
) Bar.prototype = Object.create(Foo.prototype)
. So the second line, which causes the Bar
declaration to be included, doesn't include the Bar.prototype =
statement because it's already included.
Not immediately sure what a general solution looks like (the last time I tried to naively sort statements according to their original order, it ended badly), but I'll try a few things. Suggestions welcome!
from rollup.
Fixed in 0.9.0 - have confirmed all the d3-shape tests now pass without the workaround
from rollup.
Related Issues (20)
- Expose code in entryFileNames, chunkFileNames, and assetFileNames HOT 7
- how to force Rollup imported constructs replace by module code itself
- Multiple `manualChunks` values
- Our generated chunk got blocked from all the adblockers HOT 1
- importing rollup from esm.sh doesn't work HOT 2
- Replace glob.sync by globSync in code example HOT 4
- CJS re-export regression with externalLiveBindings: false HOT 1
- NodeJS Core Dump on Specific Syntax Error (`Prop::Assign`) HOT 9
- Missing known globals: WeakRef, FinalizationRegistry, AggregateError.
- Default option for hashCharacters is not adblock-safe HOT 1
- Assistance with Rollup export functions & default.
- Support for 32-bit Linux (x86/ia32)
- onLog documentation is lacking something HOT 2
- Provide format info in output.chunkFileNames callback HOT 1
- Why is rollup creating an additional file of just exports from my entry file? HOT 4
- When I use format: "es" & sourcemap: false, bundle.write outputs an es module and a systemjs module with a sourcemap HOT 1
- What has been upgraded “terser: 5.27.3” HOT 1
- Exceptional performance of `namespace import` object values
- Cannot figure out a good workflow for a Shopify site...
- Setting `moduleSideEffects: false` removes side effectful getter inside a exported function since 4.9.2 HOT 2
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 rollup.