You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I have this configuration on vite.config.ts (it's a solution to use Vite.js with AWS Amplify as shown here):
exportdefaultdefineConfig(async()=>{return{define: {global: {},}...// rest of config}}
I got this error:
[vite]: Rollup failed to resolve import "@theme-ui/{}" from "/hdd1T/startup/ttoss/ttoss/node_modules/theme-ui/dist/theme-ui.esm.js".
This is most likely unintended because it can break your application at runtime.
If you do want to externalize this module explicitly add it to
`build.rollupOptions.external`
error during build:
It seems that whenever I use to define global, it replaces export { default as Global } from '@theme-ui/global'; on theme-ui/dist/theme-ui.esm.js. For example, if I use global: 'window' on vite.config.ts, the error message changes to:
[vite]: Rollup failed to resolve import "@theme-ui/window" from
Describe the bug
When I have this configuration on
vite.config.ts
(it's a solution to use Vite.js with AWS Amplify as shown here):I got this error:
It seems that whenever I use to define
global,
it replacesexport { default as Global } from '@theme-ui/global';
ontheme-ui/dist/theme-ui.esm.js.
For example, if I useglobal: 'window'
onvite.config.ts,
the error message changes to:To Reproduce
Steps to reproduce the behavior:
{ define { global: { } }
onvite.config.ts
yarn
andyarn turbo run build.
Expected behavior
It shouldn't not replace the
global
from@theme-ui/global.
Additional context
If you're using
{ define { global: { } }
to use with AWS Amplify, you can remove the config and add this script.The text was updated successfully, but these errors were encountered: