Error in Gatsby - Styles detected outside of '.css.(ts/js)' files #200
-
I'm trying to convert a gatsby site using theme-ui to vanilla-extract & sprinkles. I'm running into this error: Error: VanillaExtractPlugin: Styles detected outside of '.css.(ts/js)' files. You probably don't want this as these styles can't be statically extracted. If this is the desired behaviour, set 'allowRuntime: true'. Using gatsby-plugin-vanilla-extract Where would I set that config? I tried inside of gatsby-config as a plugin option, but I still got the same error. Alternatively, is there a better way to go about converting a gatsby / theme-ui site? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Not being able to set |
Beta Was this translation helpful? Give feedback.
Not being able to set
allowRuntime
is an issue with gatsby-plugin-vanilla-extract so I can't do a lot to help there. However, I don't think that's what you want. It sounds like you're calling style outside of a.css.ts
file. But there could also be another issue. Impossible to tell without a replication to look at.