更多问题
June 9, 2023Less than 1 minute
更多问题
问题1 默认无?inline导入废弃
Default import of CSS without `?inline` is deprecated. Add the `{ query: '?inline' }` glob option to fix this.
For example: `import.meta.glob("./styles/background/*.scss", { "eager": true, "query": "?inline" })`
const Themes: Record<string, any> = import.meta.glob('./styles/background/*.scss', {
eager: true,
})
新增参数
const Themes: Record<string, any> = import.meta.glob('./styles/background/*.scss', {
eager: true,
query: '?inline',
})