We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
Parcel does not transpile es6 scripts to es5
package.json
{ "name": "test", "version": "1.0.0", "description": "", "source": "src/index.html", "scripts": { "start": "parcel", "build": "parcel build --no-source-maps" }, "author": "", "license": "ISC", "devDependencies": { "@babel/core": "^7.12.0", "parcel": "^2.9.0" }, "browserslist": "> 0.001%" }
src/index.html
<!doctype html> <html lang="en"> <head> <meta charset="utf-8"/> <title>My First Parcel App</title> <link rel="stylesheet" href="styles.css" /> <script type="module" src="app.js"></script> </head> <body> <h1>Hello, World!</h1> </body> </html>
src/app.js
let objA = { a: 'aa', b: 'bb' } let objB = { b: 'dd', c: 'ee' } let result = Object.assign({}, objA, objB) result.a = 'cc' console.log(objA, result)
When running yarn build, Parcel should transpile Object.assign or add polyfill for it
Object.assign
Code is not transpiled to be compatible with other old browsers
dist/index.b6cad3e0.js
!function(){var a={a:"aa",b:"bb"},c=Object.assign({},a,{b:"dd",c:"ee"});c.a="cc",console.log(a,c)}();
The text was updated successfully, but these errors were encountered:
See #7419 (comment)
For now, install core-js and add import "core-js/modules/es.object.assign.js";
core-js
import "core-js/modules/es.object.assign.js";
Sorry, something went wrong.
No branches or pull requests
馃悰 bug report
Parcel does not transpile es6 scripts to es5
馃帥 Configuration (.babelrc, package.json, cli command)
package.json
src/index.html
src/app.js
馃 Expected Behavior
When running yarn build, Parcel should transpile
Object.assign
or add polyfill for it馃槸 Current Behavior
Code is not transpiled to be compatible with other old browsers
dist/index.b6cad3e0.js
馃拋 Possible Solution
馃敠 Context
馃捇 Code Sample
馃實 Your Environment
The text was updated successfully, but these errors were encountered: