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
One of the tools I use generates the following typescript code:
import * as React from 'react';
// tslint:disable-next-line:no-var-requires
const LayerContextBS = require('./LayerContext.bs');
It's a piece of code inside my application, not inside node_modules. When that file is imported it results in TypeError: Can't find variable require. Is it possible to have files with commonjs require in Vite?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
One of the tools I use generates the following typescript code:
It's a piece of code inside my application, not inside
node_modules
. When that file is imported it results inTypeError: Can't find variable require
. Is it possible to have files with commonjsrequire
in Vite?Beta Was this translation helpful? Give feedback.
All reactions