Sanity: Let me customize the webpack config

Created on 19 Nov 2019  路  3Comments  路  Source: sanity-io/sanity

Is your feature request related to a problem? Please describe.

When I define a preview component for a type, it is often useful to re-use components that will later be used to render a type. If those components are written in typescript, it is problematic, because I cannot just import them directly.

Describe the solution you'd like

Allow me to customize the webpack config used by the sanity dev server and build.

Describe alternatives you've considered

Support a more extensive feature set out of the box, similar to create-react-app.

Feature Request

Most helpful comment

@bjoerge any update on this?

All 3 comments

I agree we should provide the ability to use a custom webpack config. In the meantime you should be able to use TypeScript for your custom components by adding a .babelrc to your sanity project and use the @babel/typescript preset.

@bjoerge any update on this?

Is there some sort of workaround for example to allow custom webpack loaders?

Was this page helpful?
0 / 5 - 0 ratings