File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed
Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change 11import pkg from '../../../package.json' with { type : 'json' }
22import { uuid } from './common/utils/index.mjs'
33
4- export { default as BUNDLED_SVG_SPRITE } from '../../lib/icons/formeo-sprite.svg?raw'
4+ // NOTE: The following import uses Vite's '?raw' query parameter to import the SVG as a string.
5+ // This will only work in Vite environments. In non-Vite environments, BUNDLED_SVG_SPRITE will be null.
6+ let BUNDLED_SVG_SPRITE = null ;
7+ try {
8+ // Vite-specific import. Will fail in non-Vite environments.
9+ // eslint-disable-next-line import/no-unresolved
10+ BUNDLED_SVG_SPRITE = require ( '../../lib/icons/formeo-sprite.svg?raw' ) ;
11+ } catch ( e ) {
12+ // Fallback: BUNDLED_SVG_SPRITE remains null.
13+ }
14+ export { BUNDLED_SVG_SPRITE } ;
515
616const name = pkg . name
717export const version = pkg . version
You can’t perform that action at this time.
0 commit comments