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

optional chaining and rest spread? #17

Open
j-5-s opened this issue Aug 12, 2020 · 1 comment
Open

optional chaining and rest spread? #17

j-5-s opened this issue Aug 12, 2020 · 1 comment

Comments

@j-5-s
Copy link

j-5-s commented Aug 12, 2020

Hi,
my babel transpiling seems to be breaking with other things like optionals and rest spread plugins are used.I've put this esx-ssr at the end of the plugins array but i think maybe the acorn parser in to-esx doesnt read the transpiled code as all plugins are run in parellel maybe? Are you aware of any issues using this with other plugins like babel/plugin-proposal-optional-chaining?

Error:

Webpack Build Time For Server Build:  885 ms
(node:36582) UnhandledPromiseRejectionWarning: Error: Module build failed (from ./node_modules/babel-loader/lib/index.js):
SyntaxError: <REMOVED>/src/server.js: Unexpected token (36:33)
    at Object.pp$4.raise (<REMOVED>node_modules/acorn/dist/acorn.js:2825:15)
    at Object.pp.unexpected (<REMOVED>node_modules/acorn/dist/acorn.js:689:10)
    at Object.pp$3.parseExprAtom (<REMOVED>/node_modules/acorn/dist/acorn.js:2270:12)
    at Object.parseExprAtom (<REMOVED>/node_modules/acorn-jsx/index.js:445:22)
    at Object.pp$3.parseExprSubscripts (<REMOVED>/node_modules/acorn/dist/acorn.js:2089:21)
    at Object.pp$3.parseMaybeUnary (<REMOVED>/node_modules/acorn/dist/acorn.js:2066:19)
    at Object.pp$3.parseExprOps (<REMOVED>/node_modules/acorn/dist/acorn.js:2010:21)
    at Object.pp$3.parseMaybeConditional (<REMOVED>/node_modules/acorn/dist/acorn.js:1993:21)
    at Object.pp$3.parseMaybeAssign (<REMOVED>/node_modules/acorn/dist/acorn.js:1968:21)
    at Object.pp$3.parseMaybeConditional (<REMOVED>/node_modules/acorn/dist/acorn.js:1998:30)
    at Object.pp$3.parseMaybeAssign (<REMOVED>/node_modules/acorn/dist/acorn.js:1968:21)
    at Object.pp$1.parseVar (<REMOVED>/node_modules/acorn/dist/acorn.js:1228:26)
    at Object.pp$1.parseVarStatement (<REMOVED>/node_modules/acorn/dist/acorn.js:1092:10)
    at Object.pp$1.parseStatement (<REMOVED>/node_modules/acorn/dist/acorn.js:842:19)
    at Object.pp$1.parseBlock (<REMOVED>/node_modules/acorn/dist/acorn.js:1161:23)
    at Object.pp$3.parseFunctionBody (<REMOVED>/node_modules/acorn/dist/acorn.js:2671:24)

fails on this line
Screen Shot 2020-08-12 at 4 06 36 PM

babel config
Screen Shot 2020-08-12 at 4 02 58 PM

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

2 participants