Styled-jsx: SyntaxError: import

Created on 5 Dec 2016  路  3Comments  路  Source: vercel/styled-jsx

In a non-next.js project, after installing styled-jsx and adding "styled-jsx/babel" to the plugins array in my .babelrc file, I'm seeing the following error on compilation:

Module build failed: /my_project/node_modules/styled-jsx/babel.js:1
(function (exports, require, module, __filename, __dirname) { import jsx from 'babel-plugin-syntax-jsx'
                                                              ^^^^^^
SyntaxError: Unexpected token import

Is there something else needed in the babel config to get this to work?

Most helpful comment

We're fixing this now. It's publishing import export rather than compiling it atm. https://unpkg.com/[email protected]/

All 3 comments

We're fixing this now. It's publishing import export rather than compiling it atm. https://unpkg.com/[email protected]/

@adamyonk Does 0.0.3 work?

Fixed!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

nicolastelfer picture nicolastelfer  路  4Comments

corysimmons picture corysimmons  路  4Comments

loick picture loick  路  4Comments

TonyHYK picture TonyHYK  路  4Comments

giuseppeg picture giuseppeg  路  4Comments