Comments (4)
this could be an option
https://observablehq.com/@observablehq/how-to-embed-a-notebook-in-a-react-app
from fire-elect.
Really cool! We can develop interactive charts in Observable and embed them into react
from fire-elect.
Tried to add a notebook to react app, kept seeing the following error even if I added @babel/plugin-syntax-import-meta:
./node_modules/@observablehq/downloading-and-embedding-notebooks/[email protected] SyntaxError: ~/pretty-animation/node_modules/@observablehq/downloading-and-embedding-notebooks/[email protected]: Support for the experimental syntax 'importMeta' isn't currently enabled (4:206): ... Add @babel/plugin-syntax-import-meta (https://git.io/vbKK6) to the 'plugins' section of your Babel config to enable parsing.
What I tried:
-
adding a babel property into package.json:
"babel": { "plugins": [ "@babel/plugin-syntax-import-meta" ] },
-
using react-app-rewired:
(https://medium.com/manato/introduce-babel-new-plugins-to-create-react-app-ea55f56c3811)
And putting this in .babelrc
"plugins": [ "@babel/plugin-syntax-import-meta" ]
When I intentionally misspell the plugin name, the complain becomes Error: Cannot find module 'babel-plugin-plugin-syntax-import-meta'
Current suspicion is it has to do with babel 7 (https://babeljs.io/docs/en/config-files#6x-vs-7x-babelrc-loading). The blog post over in observable was back in May 2018, while babel 7 was released in August 2018.
from fire-elect.
have the same problem when trying to embed a notebook into react
from fire-elect.
Related Issues (20)
- 給問嗎 component
- 看看其他人 component
- 庶民心聲 - container component
- Archive 頁面 - 切版&圖片選擇
- Navbar 樣式 HOT 1
- App Bar 的 bug
- 整個網站 font 的基本顏色 HOT 2
- 戰情室 - 串接 firebase
- 大膽預測的立委雙位數參考席次會被截掉 HOT 1
- 大膽預測互動
- 表單填寫 HOT 3
- 表單填寫另開隱私分頁,原填寫資料會跑掉
- 認同請分享的 CSS 問題
- 臉書分享
- 認同請分享的連結錯誤 HOT 3
- 我大膽預測 歷年得票率改圖
- 認同請分享 得票率legend改小
- 我大膽預測:其他政黨加tooltip
- 我大膽預測:立委席次改整數
- 首頁:庶民區塊改成認同請分享
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fire-elect.