-
-
Notifications
You must be signed in to change notification settings - Fork 138
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
import element-plus css. #171
Comments
+1 |
Looks like same problem with SSG build: [vite-ssg] Build for server... [vite-ssg] An internal error occurred. (node:50456) UnhandledPromiseRejectionWarning: TypeError [ERR_UNKNOWN_FILE_EXTENSION]: Unknown file extension ".css" for /Users/ztxone/Downloads/domain/vue3_vite_tw3/node_modules/swiper/swiper.min.css (node:50456) 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 (node:50456) [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. package.json |
Here has a hack of this problem: |
No it's not working, it's a fix for people using swiper not element... |
Is there no solution until now? |
I have the same issue with element-plus [vite-ssg] An internal error occurred.
[vite-ssg] Please report an issue, if none already exists: https://github.com/antfu/vite-ssg/issues
node:internal/errors:465
ErrorCaptureStackTrace(err);
^
TypeError [ERR_UNKNOWN_FILE_EXTENSION]: Unknown file extension ".css" for /Users/mrzdecore/Projects/oomcs/node_modules/.pnpm/element-plus@2.2.2_vue@3.2.36/node_modules/element-plus/theme-chalk/el-row.css
at new NodeError (node:internal/errors:372:5)
at Object.getFileProtocolModuleFormat [as file:] (node:internal/modules/esm/get_format:80:11)
at defaultGetFormat (node:internal/modules/esm/get_format:122:38)
at defaultLoad (node:internal/modules/esm/load:21:20)
at ESMLoader.load (node:internal/modules/esm/loader:407:26)
at ESMLoader.moduleProvider (node:internal/modules/esm/loader:326:22)
at new ModuleJob (node:internal/modules/esm/module_job:66:26)
at ESMLoader.#createModuleJob (node:internal/modules/esm/loader:345:17)
at ESMLoader.getModuleJob (node:internal/modules/esm/loader:304:34)
at async ModuleWrap.<anonymous> (node:internal/modules/esm/module_job:82:21) {
code: 'ERR_UNKNOWN_FILE_EXTENSION'
} is there any work arround ? |
try this in vite.config |
@xingzichen thank you, this worked for me |
Another option is to move code that imports |
any solution? |
I add the ssr options in
|
thk! it works!!! |
SSG building produce an issue, when use button of element-plus. CSS importing has some problem.
The text was updated successfully, but these errors were encountered: