Gatsby: [themes] Regression in transpiling Yarn workspaces

Created on 6 Jul 2019  路  3Comments  路  Source: gatsbyjs/gatsby

Description

On @ChristopherBiscardi鈥檚 stream today, he set up a local copy of gatsby-theme-blog and the Babel transpilation didn't work. It looks like something happened that is excluding local workspaces from the Babel transpilation.

For the next two weeks, you can watch the issue happen on https://www.twitch.tv/chrisbiscardi in the videos section.

Steps to reproduce

  1. Create a new site from the Gatsby blog theme starter
  2. Pull a local copy of gatsby-theme-blog
  3. Set it up as a workspace
  4. On starting develop mode, it'll crash with "Unexpected token" errors.

Expected result

Transpilation should happen.

Actual result

Plugin for ES6 compilation is required to get develop to run.

confirmed themes bug

Most helpful comment

Note that if you run into this in a workspaces environment, you can add this to your site's gatsby-config for now while we work out a fix.

{
  resolve: `gatsby-plugin-compile-es6-packages`,
  options: {
    modules: [`gatsby-theme-blog`]
  }
},

Also @jlengstorf I'm an affiliate on Twitch so I think my videos get archived for 60 days now and here's a link to the specific video: https://www.twitch.tv/videos/448723773##

All 3 comments

This is interesting.
I started with the gatsby-starter-blog-theme and it worked mostly fine. I can start up without any issues.

I did notice an error message in the develop script #15436, but it starts and works fine.

Note that if you run into this in a workspaces environment, you can add this to your site's gatsby-config for now while we work out a fix.

{
  resolve: `gatsby-plugin-compile-es6-packages`,
  options: {
    modules: [`gatsby-theme-blog`]
  }
},

Also @jlengstorf I'm an affiliate on Twitch so I think my videos get archived for 60 days now and here's a link to the specific video: https://www.twitch.tv/videos/448723773##

Fix published in [email protected]

Was this page helpful?
0 / 5 - 0 ratings

Related issues

benstr picture benstr  路  3Comments

hobochild picture hobochild  路  3Comments

totsteps picture totsteps  路  3Comments

signalwerk picture signalwerk  路  3Comments

Oppenheimer1 picture Oppenheimer1  路  3Comments