element-plus / element-plus-nuxt-starter

🌰 A starter example for element-plus with Nuxt 3.
https://element-plus-nuxt.vercel.app
MIT License
297 stars 82 forks source link

How import @element-plus/icons? #9

Closed 209 closed 2 years ago

209 commented 3 years ago
(node:30089) Warning: To load an ES module, set "type": "module" in the package.json or use the .mjs extension.
(Use `node --trace-warnings ...` to show where the warning was created)
[Vue warn]: Unhandled error during execution of async component loader 
  at <AsyncComponentWrapper>
[Vue warn]: Unhandled error during execution of setup function 
  at <AsyncComponentWrapper>
Unexpected token 'export'
  at wrapSafe (internal/modules/cjs/loader.js:1001:16)  
  at Module._compile (internal/modules/cjs/loader.js:1049:27)  
  at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10)  
  at Module.load (internal/modules/cjs/loader.js:950:32)  
  at Function.Module._load (internal/modules/cjs/loader.js:790:12)  
  at ModuleWrap.<anonymous> (internal/modules/esm/translators.js:199:29)  
  at ModuleJob.run (internal/modules/esm/module_job.js:183:25)  
  at async Loader.import (internal/modules/esm/loader.js:178:24)  
  at async __instantiateModule__ (file://./.nuxt/dist/server/server.mjs:3862:3)
[Vue warn]: Invalid vnode type when creating vnode: undefined.
xiaoxian521 commented 2 years ago

add: https://github.com/element-plus/element-plus-nuxt-starter/commit/8f8942c1d07a5678b8da13c87d8969baa32a5a95