Open michealroberts opened 2 years ago
try adding it like that:
{ find: '@', replacement: path.resolve(__dirname, './src') },
@y-a-ava Thank you, although that may work - and I will try it - the method I've applied is standard and doesn't seem to work out of the box. I still believe it to be a bug with using this plugin with Vite 3.
@y-a-ava I can also confirm that the above gives the same error result.
i am also using vue 2.7 with vite 3, and i dont have this error. vite: 3.1.0 vue: 2.7.10
change your config like this
alias: {
'@/': `${path.resolve(__dirname, 'src')}/`,
},
I've recently upgraded a project to Sue 2.7.*, and I am now going through a process of upgrading this repo using the example setup in the examples of this repo.
However, I am running into a path alias issue:
My vite.config.ts is as follows:
main.ts
is inside src, as are all of the other sub-directories.index.html
is in the level above, at the root of the app alongside thevite.config.ts
file.And my tsconfig.json is as follows:
I also have the following Vite server that serves the app as an express middleware:
I'm wondering, what have I done wrong here?
The full error for context is here:
Logging
Running
Vite build --debug
yields the following:System Info