Comments (4)
Is this a good place for a contributor to start? It seems like a good excuse to dig into the codebase.
from rollup.
Would be an excellent place, and you'd be extremely welcome 😄
It think it's just a matter of having a similar check to this one further down, next to these ones.
from rollup.
I can't reproduce the original problem. Using this code as foo.js
:
import { parse } from 'acorn';
class Module {
parse () {
// ...
}
}
export default parse;
When I run rollup -i foo.js -f cjs -e acorn
I get this output:
'use strict';
var acorn = require('acorn');
class Module {
parse () {
// ...
}
}
var foo = null.parse;
module.exports = foo;
So there's clearly a problem, as null
should be acorn
, but I can't get it to rewrite parse() {
as acorn.parse() {
.
from rollup.
Yeah, turned out there were a couple of things going on here, fixed in 0.11.3. The method name got rewritten if the function was used in the module in question; the null.parse
thing was happening because module.getCanonicalName
was called before external modules were assigned names - just needed to change the order.
from rollup.
Related Issues (20)
- Variables Conflict on Build - React Component HOT 1
- ast type from getModuleInfo return value is not matched between docs and code HOT 1
- Rust panic on Mittwald servers HOT 6
- rollup error [commonjs--resolver] Identifier has already been declared HOT 3
- Imported CSS stylesheet stays in CSS output after the importing file is tree shaken HOT 2
- distribute at least a pure js edition HOT 5
- Many extra chunks are generated HOT 2
- When I set treeshake.moduleSideEffects to false in the configuration, the side effects in module alpha.js still manifest in the bundled code. Additionally, the functions doNothing and alpha, which should have been eliminated by treeshaking, still persist in the code. HOT 1
- I'm not sure if this is a bug. When I set treeshake.moduleSideEffects to false in the configuration, the functions doNothing and alpha, which should have been eliminated by treeshaking, still persist in the code. HOT 2
- systemjs not updated for any string export name spec HOT 2
- babel pure annotation output with leading comments not supported HOT 2
- Cannot find module @rollup/rollup-win - nuxt 3 - npm install fail HOT 5
- Rollup build --watch not works on docker with Vite
- Crash on msys2 environment HOT 2
- Issue with rollup/typescript and local imports HOT 1
- Donating Funds to Rollup HOT 1
- Tree-shaking incorrectly eliminates optional access to a shared array element HOT 2
- Chunk grouping HOT 3
- Offical Plugins use old dependencies HOT 2
- Won't unreferenced files be packaged? HOT 9
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.