Closed konsumer closed 5 years ago
I have a component that looks like this:
import React from 'react' export default () => (<div>HI</div>)
My package.json has this:
package.json
{ "source": "src/index.js", "main": "lib/index.js", "files": [ "lib/index.js", "lib/index.mjs", "lib/index.umd.js" ], "scripts": { "build": "microbundle build --jsx React.createElement --external react -o lib" }, "dependencies": { "react": "^16.9.0" } }
This results in this error:
PROJECT: setting options.module is deprecated, please override options.mainFields instead PROJECT: setting options.jsnext is deprecated, please override options.mainFields instead PROJECT: setting options.module is deprecated, please override options.mainFields instead PROJECT: setting options.jsnext is deprecated, please override options.mainFields instead PROJECT: setting options.module is deprecated, please override options.mainFields instead PROJECT: setting options.jsnext is deprecated, please override options.mainFields instead (buble plugin) SyntaxError: Unexpected token (2:30) at /home/konsumer/Documents/WORKSPACE/PROJECT/src/index.js:2:30 1 : import React from 'react'; 2 : export default (() => <div>HI</div>); ^
can you try microbundle@next?
microbundle@next
That worked! I made a demo project. Thanks for the quick help @ForsakenHarmony !
Closing this to clean up issues, trying to figure out if we can release it as latest
I have a component that looks like this:
My
package.json
has this:This results in this error: