Giter Club home page Giter Club logo

Comments (10)

antfu avatar antfu commented on May 30, 2024

Did you update the vite.config.ts? alias is moved to resolve.alias.

from vitesse.

frck006 avatar frck006 commented on May 30, 2024

Yes I take your template:
export default defineConfig({
resolve: {
alias: {
'~/': ${path.resolve(__dirname, 'src')}/,
},
},

from vitesse.

greenskybluephish avatar greenskybluephish commented on May 30, 2024

I just cloned the project on my windows machine and I am getting the same error FYI.

image

image

image

from vitesse.

antfu avatar antfu commented on May 30, 2024

Can you run cross-env DEBUG=vite-plugin-components:* pnpm dev and show me the log? Thanks.

from vitesse.

greenskybluephish avatar greenskybluephish commented on May 30, 2024

Here you go. I just cloned the project into my wsl shell and it had no issues, so possibly related to the new layouts feature?

Seems like a couple issues have been opened with resolving alias' in Vite.
vitejs/vite#2003

image

from vitesse.

JohnCampionJr avatar JohnCampionJr commented on May 30, 2024

I can duplicate this too. It has something to do with the changes in the component between 0.6.6 and 0.6.7.

Using the main branch (so before layouts) and updating packages to:

"vite": "2.0.0-beta.65",
"vite-plugin-components": "0.6.8",

or

"vite": "2.0.0-beta.69",
"vite-plugin-components": "0.6.8",

Will break this. There is a WIP: HMR commit after 0.6.6 and before 0.6.7. Did you intend to leave that, @antfu ?

from vitesse.

antfu avatar antfu commented on May 30, 2024

Should be fixed in "vite-plugin-components": "^0.6.9", thanks for @JohnCampionJr's help. Can anyone help to confirm this on Windows? Thanks!

from vitesse.

frck006 avatar frck006 commented on May 30, 2024

Sorry, no change, the problem is always here:
image

I've only done:

npx degit antfu/vitesse my-vitesse-app3
cd my-vitesse-app3
pnpm i
pnpm dev

The log from debug:

⚡ Vite dev server running at:

 > Network:  http://192.168.1.89:3333/
 > Local:    http://localhost:3333/
 > Network:  http://100.122.157.156:3333/
 > Network:  http://172.17.158.113:3333/

 ready in 2762ms.

[@vue/compiler-sfc] <script setup> is still an experimental proposal.
Follow its status at https://github.com/vuejs/rfcs/pull/227.

[@vue/compiler-sfc] When using experimental features,
it is recommended to pin your vue dependencies to exact versions to avoid breakage.

 vite-plugin-components:glob started with: [src\components\**\*.{vue,md}] +0ms
 vite-plugin-components:glob 0 components found. +7ms
 vite-plugin-components:context:components add [] +0ms
 vite-plugin-components:context:search {} +0ms
 vite-plugin-components:transform C:/Franck/cgid/vuejs3/my-vitesse-app3/src/App.vue +0ms
 vite-plugin-components:transform | router-view +0ms
 vite-plugin-components:transform ^ (0) +1ms
 vite-plugin-components:transform C:/Franck/cgid/vuejs3/my-vitesse-app3/src/App.vue +18ms
 vite-plugin-components:transform | router-view +0ms
 vite-plugin-components:transform ^ (0) +0ms
 vite-plugin-components:transform C:/Franck/cgid/vuejs3/my-vitesse-app3/src/pages/index.vue +18s
 vite-plugin-components:transform | carbon-campsite +1ms
 vite-plugin-components:transform ^ (1) +1ms
 vite-plugin-components:transform C:/Franck/cgid/vuejs3/my-vitesse-app3/src/layouts/default.vue +66ms
 vite-plugin-components:transform | router-view +1ms
 vite-plugin-components:transform | Footer +0ms
 vite-plugin-components:transform ^ (0) +0ms
 vite-plugin-components:transform C:/Franck/cgid/vuejs3/my-vitesse-app3/src/pages/index.vue +53ms
 vite-plugin-components:transform ^ (0) +0ms
 vite-plugin-components:transform C:/Franck/cgid/vuejs3/my-vitesse-app3/src/layouts/home.vue +1s
 vite-plugin-components:transform | router-view +0ms
 vite-plugin-components:transform | Footer +0ms
 vite-plugin-components:transform ^ (0) +0ms

from vitesse.

antfu avatar antfu commented on May 30, 2024

Fixed in [email protected].

from vitesse.

frck006 avatar frck006 commented on May 30, 2024

Yes, I confirm, it works. Thank you.
(Think to update package.json)

from vitesse.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.