antfu / vite-ssg

Static site generation for Vue 3 on Vite

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ERR_UNKNOWN_FILE_EXTENSION: Unknown file extension ".vue"

alexgrozav opened this issue · comments

The issue

When an external package is importing / exporting a file type that is known to vite (.vue), the build fails.

Stacktrace

[vite-ssg] An internal error occurred.
[vite-ssg] Please report an issue, if none already exists: https://github.com/antfu/vite-ssg/issues
(node:79140) UnhandledPromiseRejectionWarning: TypeError [ERR_UNKNOWN_FILE_EXTENSION]: Unknown file extension ".vue" for /Users/alexgrozav/Workspace/inkline.io/node_modules/@inkline/inkline/components/IAlert/examples/basic.vue
    at new NodeError (internal/errors.js:322:7)
    at Loader.defaultGetFormat [as _getFormat] (internal/modules/esm/get_format.js:71:15)
    at Loader.getFormat (internal/modules/esm/loader.js:105:42)
    at Loader.getModuleJob (internal/modules/esm/loader.js:243:31)
    at async ModuleWrap.<anonymous> (internal/modules/esm/module_job.js:78:21)
    at async Promise.all (index 0)
    at async link (internal/modules/esm/module_job.js:83:9)
(Use `node --trace-warnings ...` to show where the warning was created)
(node:79140) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 436)
(node:79140) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

Thank you for the help, @userquin. I'm running into a different issue now, if you can help me out with it #166