Microbundle: Coud not build js with flow types

Created on 19 Apr 2019  路  4Comments  路  Source: developit/microbundle

(flow-remove-types plugin) SyntaxError: Unexpected token (85:44)

at undefined:85:44
SyntaxError: Unexpected token (85:44)
    at Parser.pp$5.raise (/home/i/all-work/react-quick-pinch-zoom/node_modules/babylon/lib/index.js:4454:13)
    at Parser.pp.unexpected (/home/i/all-work/react-quick-pinch-zoom/node_modules/babylon/lib/index.js:1761:8)
    at Parser.pp$3.parseParenAndDistinguishExpression (/home/i/all-work/react-quick-pinch-zoom/node_modules/babylon/lib/index.js:3859:10)
    at Parser.pp$3.parseExprAtom (/home/i/all-work/react-quick-pinch-zoom/node_modules/babylon/lib/index.js:3709:19)
    at Parser.parseExprAtom (/home/i/all-work/react-quick-pinch-zoom/node_modules/babylon/lib/index.js:7238:22)
    at Parser.pp$3.parseExprSubscripts (/home/i/all-work/react-quick-pinch-zoom/node_modules/babylon/lib/index.js:3494:19)
    at Parser.pp$3.parseMaybeUnary (/home/i/all-work/react-quick-pinch-zoom/node_modules/babylon/lib/index.js:3474:19)
    at Parser.pp$3.parseExprOp (/home/i/all-work/react-quick-pinch-zoom/node_modules/babylon/lib/index.js:3435:42)
    at Parser.pp$3.parseExprOp (/home/i/all-work/react-quick-pinch-zoom/node_modules/babylon/lib/index.js:3438:19)
    at Parser.pp$3.parseExprOps (/home/i/all-work/react-quick-pinch-zoom/node_modules/babylon/lib/index.js:3408:17)

enhancement good first issue help wanted

Most helpful comment

How about using babel plugin to remove flow types?

All 4 comments

How about using babel plugin to remove flow types?

That's a great idea! It would avoid an entire AST transform that we currently run on all .js files regardless of whether they have flow types!

Fixed as of #362.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jlkiri picture jlkiri  路  4Comments

kesla picture kesla  路  4Comments

manferlo81 picture manferlo81  路  5Comments

pkrawc picture pkrawc  路  4Comments

developerdizzle picture developerdizzle  路  5Comments