Previewing local BCD in Local Content #269
-
I am working on some new content in content and this is requiring me to also update the Browser Compat Data. I would like to be able to veiw my local version of BCD in my local version of content so that I can see the end effect of changing this data visually, rather than my local content displaying the live BCD. Is there a environment setting that allows this to happen? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Hey there! Unfortunately there isn't really a (reasonable) way to attach the development copy of BCD to Yari. BCD includes a build step that must be run every time that BCD changes, which takes about a minute or two to complete (it's not intended to run so frequently). Additionally, Yari is not configured for live updates of BCD since it's an imported package. There's been discussion of adding a minimal render to BCD PRs, but that's still in the initial discussion stages. If you'd still like to see the local BCD changes, this would be the process: cd browser-compat-data
npm run build # Build a new BCD version
cd ../mdn-content
npx install-local ../browser-compat-data/build # Install the new BCD build
yarn dev # Re-run the server
# Redo every time BCD changes Edit: this no longer works since the introduction of the mdn/bcd-utils middleware. I plan to try and remove this middleware and let Yari use the data directly again. |
Beta Was this translation helpful? Give feedback.
-
Thank you for starting the discussion. I’m closing this now due to inactivity, but if you think that’s a mistake, feel free to reply. You’re also welcome to join the MDN Discord if you’d prefer to chat with us more about it in sync. |
Beta Was this translation helpful? Give feedback.
Hey there! Unfortunately there isn't really a (reasonable) way to attach the development copy of BCD to Yari. BCD includes a build step that must be run every time that BCD changes, which takes about a minute or two to complete (it's not intended to run so frequently). Additionally, Yari is not configured for live updates of BCD since it's an imported package. There's been discussion of adding a minimal render to BCD PRs, but that's still in the initial discussion stages.
If you'd still like to see the local BCD changes, this would be the process: