-
Notifications
You must be signed in to change notification settings - Fork 67
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
Support Vega-Lite 5 #367
Comments
@kristw do you have time to update react vega? |
will try to take a look by eow |
Vega-Lite 5.1 is out. |
Running into problem with storybook. The exported js from
|
Yes, Vega-Lite generates es2020 (https://github.com/vega/vega-lite/blob/4b5afa4118a021178933c006f585d64d9b9f7ea2/tsconfig.json#L3) for |
I did upgrade but still having issue with babel not recognizing the syntax. |
Babel 7.8 supposedly supports it https://babeljs.io/blog/2020/01/11/7.8.0 |
For people using the current version of create-react-app nullish coalescing is a problem as well, @kristw and @domoritz. In order to get react-vega to work without ejecting I had to
const { override, addExternalBabelPlugins } = require('customize-cra')
module.exports = override(
addExternalBabelPlugins(
'@babel/plugin-proposal-nullish-coalescing-operator',
'@babel/plugin-syntax-optional-chaining'
),
) This allowed Babel to handle the nullish coalescing in Edit - for reference, my {
"compilerOptions": {
"target": "es5",
"lib": [
"dom",
"dom.iterable",
"esnext"
],
"allowJs": true,
"skipLibCheck": true,
"esModuleInterop": true,
"allowSyntheticDefaultImports": true,
"strict": true,
"forceConsistentCasingInFileNames": true,
"module": "esnext",
"moduleResolution": "node",
"resolveJsonModule": true,
"isolatedModules": true,
"downlevelIteration": true,
"strictNullChecks": false,
"noEmit": true,
"jsx": "react-jsx",
"noFallthroughCasesInSwitch": true
},
"include": [
"src"
]
} |
Thanks for posting the fix for cra! |
@ndobb Thanks for the pointer. Adding the two missing babel plugin resolve storybook. |
Now running into runtime issue with
|
The missing transform issue usually happens when Vega is loaded twice. |
I follow @ndobb suggestion and ran into this error instead
Any suggestion? |
You need to make sure to have a loader that supports esNext syntax. |
What loader do you use? I'm trying to get Typescript, React, and react-vega all to play nice together and still running into this issue. |
I'll revert to es2015 in the next Vega-Lite release. Please use 5.0, not 5.1 for now. |
I got a similar error and managed to get storybook to work by adding the following config to process VG/VL via babel:
|
I fixed the output in vega/vega-lite#7595 btw. We are going back to es2015 for now. |
No description provided.
The text was updated successfully, but these errors were encountered: