#4

Vue example doesn't work?

Openalanscodelogopened 8mo ago

When I followed the vue docs I got the following error. It seems the export pulls in the svelte component? Not sure what's happening. I'm technically using nuxt so that might be interfering but I doubt it.

I used the web component export and that worked fine.

[9:32:46 PM]  ERROR  Internal server error: Failed to parse source for import analysis because the content contains invalid JS syntax. If you are using JSX, make sure to name the file with the .jsx or .tsx extension.
  Plugin: vite:import-analysis
  File: /home/alan/code/alanscodelog.github.io/node_modules/.pnpm/hover-tilt@1.0.0_svelte@5.53.0/node_modules/hover-tilt/dist/components/HoverTilt.svelte:309:9
  307 |      }
  308 |    });
  309 |  </script>
      |           ^
  310 |
  311 |  <div
      at TransformPluginContext._formatLog (file:///home/alan/code/alanscodelog.github.io/node_modules/.pnpm/vite@7.3.1_@types+node@25.2.3_jiti@2.6.1_lightningcss@1.31.1_terser@5.46.0_yaml@2.8.2/node_modules/vite/dist/node/chunks/config.js:28999:43)
      at TransformPluginContext.error (file:///home/alan/code/alanscodelog.github.io/node_modules/.pnpm/vite@7.3.1_@types+node@25.2.3_jiti@2.6.1_lightningcss@1.31.1_terser@5.46.0_yaml@2.8.2/node_modules/vite/dist/node/chunks/config.js:28996:14)
      at TransformPluginContext.transform (file:///home/alan/code/alanscodelog.github.io/node_modules/.pnpm/vite@7.3.1_@types+node@25.2.3_jiti@2.6.1_lightningcss@1.31.1_terser@5.46.0_yaml@2.8.2/node_modules/vite/dist/node/chunks/config.js:27082:10)
      at async file:///home/alan/code/alanscodelog.github.io/node_modules/.pnpm/vite-plugin-inspect@11.3.3_@nuxt+kit@4.3.1_magicast@0.5.2__vite@7.3.1_@types+node@25.2._cc6a6b40d86be8574d34aae8b1aa9054/node_modules/vite-plugin-inspect/dist/shared/vite-plugin-inspect.BzUKaD4x.mjs:403:17
      at async EnvironmentPluginContainer.transform (file:///home/alan/code/alanscodelog.github.io/node_modules/.pnpm/vite@7.3.1_@types+node@25.2.3_jiti@2.6.1_lightningcss@1.31.1_terser@5.46.0_yaml@2.8.2/node_modules/vite/dist/node/chunks/config.js:28797:14)
      at async loadAndTransform (file:///home/alan/code/alanscodelog.github.io/node_modules/.pnpm/vite@7.3.1_@types+node@25.2.3_jiti@2.6.1_lightningcss@1.31.1_terser@5.46.0_yaml@2.8.2/node_modules/vite/dist/node/chunks/config.js:22670:26)
      at async viteTransformMiddleware (file:///home/alan/code/alanscodelog.github.io/node_modules/.pnpm/vite@7.3.1_@types+node@25.2.3_jiti@2.6.1_lightningcss@1.31.1_terser@5.46.0_yaml@2.8.2/node_modules/vite/dist/node/chunks/config.js:24542:20)

Activity

2
simeydotme4mo ago

did you check out the vue demo?

and if so, is that exactly how you imported it? if you figured it out, please share the result here for others :)

alanscodelog4mo ago

I imported it in a nuxt app, under the hood nuxt uses vite. The vue demo is not exactly comparable to an app with build system... so I can't import it like that.

I could it working with the web component import but the moment I import from the root hover-tilt I get the mentioned error. Not a big deal but thought I'd report it in case others ran into it.