mirror of
https://github.com/johndoe6345789/low-code-react-app-b.git
synced 2026-04-24 13:44:54 +00:00
Generated by Spark: maybe we can fix these warnings: @johndoe6345789 ➜ /workspaces/spark-template (main) $ npm run dev
> spark-template@0.0.0 dev > vite 7:54:09 PM [vite] (client) Re-optimizing dependencies because lockfile has changed Port 5000 is in use, trying another one... VITE v7.3.1 ready in 381 ms ➜ Local: http://localhost:5001/ ➜ Network: http://10.0.0.185:5001/ ➜ press h + enter to show help 7:54:16 PM [vite] (client) warning: /workspaces/spark-template/src/lib/component-registry.ts 21 | for (const path of pathVariants){ 22 | try { 23 | const module = await import(path); | ^^^^ 24 | const exportName = componentConfig.export || 'default'; 25 | if (module[exportName]) { The above dynamic import cannot be analyzed by Vite. See https://github.com/rollup/plugins/tree/master/packages/dynamic-import-vars#limitations for supported dynamic import formats. If this is intended to be left as-is, you can use the /* @vite-ignore */ comment inside the import() call to suppress this warning. Plugin: vite:import-analysis File: /workspaces/spark-template/src/lib/component-registry.ts 7:54:16 PM [vite] (client) warning: /workspaces/spark-template/src/lib/unified-storage.ts 201 | const moduleName = 'sql.js'; 202 | try { 203 | return await import(moduleName); | ^^^^^^^^^^ 204 | } catch { 205 | throw new Error(`${moduleName} not installed. Run: npm install ${moduleName}`); The above dynamic import cannot be analyzed by Vite. See https://github.com/rollup/plugins/tree/master/packages/dynamic-import-vars#limitations for supported dynamic import formats. If this is intended to be left as-is, you can use the /* @vite-ignore */ comment inside the import() call to suppress this warning. Plugin: vite:import-analysis File: /workspaces/spark-template/src/lib/unified-storage.ts 7:54:23 PM [vite] (client) ✨ new dependencies optimized: framer-motion 7:54:23 PM [vite] (client) ✨ optimized dependencies changed. reloading 7:54:23 PM [vite] (client) warning: /workspaces/spark-template/src/lib/component-registry.ts 21 | for (const path of pathVariants){ 22 | try { 23 | const module = await import(path); | ^^^^ 24 | const exportName = componentConfig.export || 'default'; 25 | if (module[exportName]) { The above dynamic import cannot be analyzed by Vite. See https://github.com/rollup/plugins/tree/master/packages/dynamic-import-vars#limitations for supported dynamic import formats. If this is intended to be left as-is, you can use the /* @vite-ignore */ comment inside the import() call to suppress this warning. Plugin: vite:import-analysis File: /workspaces/spark-template/src/lib/component-registry.ts 7:54:24 PM [vite] (client) warning: /workspaces/spark-template/src/lib/unified-storage.ts 201 | const moduleName = 'sql.js'; 202 | try { 203 | return await import(moduleName); | ^^^^^^^^^^ 204 | } catch { 205 | throw new Error(`${moduleName} not installed. Run: npm install ${moduleName}`); The above dynamic import cannot be analyzed by Vite. See https://github.com/rollup/plugins/tree/master/packages/dynamic-import-vars#limitations for supported dynamic import formats. If this is intended to be left as-is, you can use the /* @vite-ignore */ comment inside the import() call to suppress this warning. Plugin: vite:import-analysis File: /workspaces/spark-template/src/lib/unified-storage.ts
This commit is contained in:
@@ -51,7 +51,7 @@ function createLazyComponent(componentConfig: ComponentConfig) {
|
||||
let lastError: Error | null = null
|
||||
for (const path of pathVariants) {
|
||||
try {
|
||||
const module = await import(path)
|
||||
const module = await import(/* @vite-ignore */ path)
|
||||
const exportName = componentConfig.export || 'default'
|
||||
|
||||
if (module[exportName]) {
|
||||
|
||||
@@ -230,7 +230,7 @@ class SQLiteAdapter implements StorageAdapter {
|
||||
private async loadSQLiteWASM(): Promise<any> {
|
||||
const moduleName = 'sql.js'
|
||||
try {
|
||||
return await import(moduleName)
|
||||
return await import(/* @vite-ignore */ moduleName)
|
||||
} catch {
|
||||
throw new Error(`${moduleName} not installed. Run: npm install ${moduleName}`)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user