Comments (4)
This code was generated from using the Typescript 4.1.5 compiler outputting to cjs, by setting "module": "commonjs"
option in tsconfig.json. The source for @shopify/polaris-tokens
is available at https://github.com/shopify/polaris-tokens.
The source code that produces the output in dist-modern/index.js
is:
export {colorFactory} from './color-factory';
Here's a TS playground demonstrating this output
from cjs-module-lexer.
Looks like TS changed its output in TS 3.9.x. Contrast 3.8 output vs 3.9 output.
microsoft/TypeScript#35967 and rollup/plugins#556 seem related
from cjs-module-lexer.
Turns out this is a duplicate of #31 and not actually related to the TypeScript output change but the trailing comma added to the property definition.
Will aim to backport the fix on Node.js as far as possible, but bear in mind Node.js 12 support isn't assured at this point.
from cjs-module-lexer.
Great hunting. Thank you @guybedford!
Turns out "output from tsc" and "output from tsc, then unknowingly ran though prettier" are two subtly different things. Sorry for making that confusing :)
from cjs-module-lexer.
Related Issues (20)
- Extending exports object detections HOT 20
- add tag for 1.2.2 HOT 4
- node ES6 import throws this error. HOT 18
- Error selecting connection connect ECONNREFUSED 127.0.0.1:5432
- Function call changes in TypeScript 4.4 seem to be breaking detection of named exports HOT 7
- Can't export when enumerable is "!0"
- When trying to build with snowpack this error is thrown HOT 4
- Not work well with TypeScript export default as output HOT 2
- exports can be detected in hashbang
- Feature Request: Also detect esbuild Re-exports HOT 1
- Bug: cannot detect exported numbers HOT 5
- Incompatibility with TypeScript (edge case) HOT 3
- Issue with parsing 'react-transition-group' HOT 2
- Rollup ^3.0.0 cjs re-exports edge case with externalLiveBindings: false HOT 8
- Out of bounds memory access HOT 1
- Real world edge case: prettier HOT 1
- Add RISC-V Support HOT 2
- Unable to detect exports from bundled webpack output HOT 6
- Cannot load externalized builtin: "internal/deps/cjs-module-lexer/lexer:/usr/lib/node_modules/cjs-module-lexer/lexer.js". HOT 9
- Allow externalized Wasm build HOT 1
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 cjs-module-lexer.