Gatsby: Any plan to support Snowpack?

Created on 28 May 2020  路  6Comments  路  Source: gatsbyjs/gatsby

All 6 comments

Hey there!

We don't have any intention to support snowpack anytime soon. Snowpack is great for modern browsers but it hasn't got a good story for legacy ones. Also, snowpack doesn't support many assets besides javascript, typescript, JSON & CSS. We have plenty of users that use svg loaders, file loaders, ... Those are not yet available in snowpack.

Even if I'm not the biggest fan of webpack, they do have the most extensive ecosystem and have a big API surface we can use to improve our bundling.

I'm particularly curious why you triggered this question? :) What the reason you want snowpack as a replacement?

Snowpack is great for modern browsers but it hasn't got a good story for legacy ones.

Yeah due to usage of ES modules, no support for IE 11 and some others, but this will be solved with the time.

I'm particularly curious why you triggered this question? :) What the reason you want snowpack as a replacement?

May be wondering the possibility of more build time improvement. Although I know now there are things like

And also May be improvement to the site performance due to better caching

At the end of the day if you need really fast build times, one can use Pax.js with SWC

You may close the issue if you want or keep it open for more discussion from Gatsbyjs community.

As far as my understanding goes, feel free to correct me if I'm wrong, but we could use snowpack for its developer experience features, but bundle the app at the when building for production.

I feel it could be worth exploring.

That said, as a big disclaimer here, I haven't really used snowpack yet and have no idea how much effort it'd be to support it.

SVG is supported already, it's even used in the snowpack example:

npx create-snowpack-app new-dir --template @snowpack/app-template-react-typescript

Also, adding scripts for extensions seems rather straight forward. E.g.

{
  "extends": "@snowpack/app-scripts-react",
  "scripts": {
    "build:scss": "sass $FILE"
  },
  "plugins": []
}

Adds SCSS import support, and it seems to work with SCSS/CSS modules also.

As my colleague said we don't have any plans to support anytime soon and thus the initial question was answered - so I'll close this issue.

Feel free to discuss further here though :)

I would like to see something faster for development than webpack. Takes 5-10s to reload and I'm using a slightly modified version of the contentful gatsby starter project. Webpack is excruciatingly slow.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

dustinhorton picture dustinhorton  路  3Comments

Oppenheimer1 picture Oppenheimer1  路  3Comments

brandonmp picture brandonmp  路  3Comments

kalinchernev picture kalinchernev  路  3Comments

benstr picture benstr  路  3Comments