Skip to content
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

[bug] asset starts with '~@' resolved error #59

Open
JonathanLee-LX opened this issue Oct 16, 2022 · 1 comment
Open

[bug] asset starts with '~@' resolved error #59

JonathanLee-LX opened this issue Oct 16, 2022 · 1 comment

Comments

@JonathanLee-LX
Copy link

JonathanLee-LX commented Oct 16, 2022

asset starts with '~@' resolved error

example

src/bar/foo.vue

<template>
   <img src='~@assets/foo.png'/>
</template>

compiled

// actually 
/src/bar/@assets/foo.png

// expected
src/assets/foo.png

vite.config.ts

import vue from '@vitejs/plugin-vue2'
import { defineConfig } from 'vite'

defineConfig({
  plugins: [vue()],
})
@JonathanLee-LX
Copy link
Author

JonathanLee-LX commented Oct 16, 2022

I think it should be caused by this line of code

slash(path.relative(options.root, path.dirname(filename)))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant