Skip to content
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

BuildError: type-plus fails to build this package (nullish coalescing operator) #620

Closed
unional opened this issue Mar 20, 2022 · 4 comments
Assignees

Comments

@unional
Copy link

unional commented Mar 20, 2022

Package name

https://github.com/unional/type-plus

Entire (stringified) error that I see in my browser console

/tmp/tmp-build/packages/build-type-plus-JuB/node_modules/type-plus/esm/object/split.js 4:95 Module parse failed: Unexpected token (4:95) File was processed with these loaders: * ./node_modules/shebang-loader/index.js * ./node_modules/string-replace-loader/index.js You may need an additional loader to handle the result of these loaders. | export function split(target, ...splitters) { | const keyMap = {}; > const s = splitters.map(s => reduceByKey(s, (p, k) => (keyMap[k] = true, p[k] = target[k] ?? s[k], p), {})); | const r = reduceByKey(target, (p, k) => keyMap[k] ? p : (p[k] = target[k], p), {}); | return [...s, r]; @ /tmp/tmp-build/packages/build-type-plus-JuB/node_modules/type-plus/esm/object/index.js 16:0-24 16:0-24 @ /tmp/tmp-build/packages/build-type-plus-JuB/node_modules/type-plus/esm/index.js @ /tmp/tmp-build/packages/build-type-plus-JuB/index.js

It is because bundlephobia currently does not support nullish coalescing operator

@unional unional changed the title BuildError: type-plus fails to build this package BuildError: type-plus fails to build this package (nullish coalescing operator) Mar 20, 2022
@Valexr
Copy link

Valexr commented Mar 21, 2022

& Optional chaining ?. too

@Valexr
Copy link

Valexr commented Mar 21, 2022

#606

@GRA0007
Copy link

GRA0007 commented Apr 10, 2022

This issue is being tracked in #530

@pastelsky
Copy link
Owner

This should work now with the latest update of Bundlephobia —
https://bundlephobia.com/package/[email protected]

Thanks for your patience.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants