@babel/plugin-proposal-object-rest-spread not being detected at beta.46
See original GitHub issueBabel/Babylon Configuration (.babelrc, package.json, cli command)
.babelrc
{
"presets": [
["@babel/env", {
"targets": { "node": "6.11.5" }
}]
],
"plugins": ["@babel/plugin-proposal-object-rest-spread"]
}
CLI Command
babel 'functions/src' --out-dir 'functions/bundle' --copy-files --ignore 'functions/src/node_modules'
Expected Behavior
Files are correctly built, as it did with beta.44
Current Behavior
With beta.46, following error arises:
Error: SyntaxError: functions/src/common/getLocations.js: Support for the experimental syntax 'objectRestSpread' isn't currently enabled (77:19):
75 | if (key === 'viewport'){
76 | const { northeast, southwest } = geometry.viewport;
> 77 | return {...prev, bounds : {
| ^
78 | ne : {
79 | lat : northeast.lat,
80 | lng : northeast.lng
Add @babel/plugin-proposal-object-rest-spread (https://git.io/vb4Ss) to the 'plugins' section of your Babel config to enable transformation.
at /Users/karlas/project/node_modules/@babel/cli/lib/babel/dir.js:185:22
at /Users/karlas/project/node_modules/@babel/cli/lib/babel/dir.js:148:23
at /Users/karlas/project/node_modules/@babel/cli/lib/babel/dir.js:120:23
at /Users/karlas/project/node_modules/@babel/cli/lib/babel/dir.js:82:23
at /Users/karlas/project/node_modules/@babel/cli/lib/babel/util.js:126:16
at runAsync (/Users/karlas/project/node_modules/@babel/core/lib/transformation/index.js:37:12)
at /Users/karlas/project/node_modules/@babel/core/lib/transform-file.js:56:36
at FSReqWrap.readFileAfterClose [as oncomplete] (fs.js:511:3)
Possible Solution
Can’t help…
Context
Just transpiling about 20 files to be used on Firebase Functions
Your Environment
software | version(s) |
---|---|
Babel | 7.0.0-beta.46 |
node | 8.11.1 |
npm | 5.6.0 |
yarn | 1.6.0 |
Operating System | macOS High Sierra |
Issue Analytics
- State:
- Created 5 years ago
- Reactions:10
- Comments:15 (3 by maintainers)
Top Results From Across the Web
@babel/plugin-proposal-object-rest-spread vulnerabilities | Snyk
version published direct vulnerabilities
7.20.2 4 Nov, 2022 0. C. 0. H. 0. M. 0. L
7.19.4 10 Oct, 2022 0. C. 0. H. 0....
Read more >Trace: The node type SpreadProperty has been renamed to ...
I believe the problem comes from using babel-preset-react-native, which depends on /babel-plugin-transform-object-rest-spread (an older version ...
Read more >@babel/plugin-proposal-object-rest-spread - Package Manager
Intro. Babel is a tool that helps you write code in the latest version of JavaScript. When your supported environments don't support certain...
Read more >Dependency-Check Report
Dependency CVE Count Confidence Evidence Count
@ampproject/remapping:2.1.2 0 6
@babel/cli:7.19.3 1 Low 8
@babel/code‑frame:7.18.6 0 8
Read more >3 a1892 watch - CSDN
DO NOT EDIT THIS FILE DIRECTLY. ... "@babel/helper-get-function-arity" "7.0.0-beta.44" ... "@babel/plugin-proposal-object-rest-spread@7.0.0-beta.46":.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
.babelrc.js
in prj root worked until beta.44, but doesn’t in 45 and aboveMmm i can´t get it work. What i made:
functions/src/.babelrc
tofunctions/src/babel.config.js
module.exports
to this file, resulting:Am I doing something wrong?