-
Notifications
You must be signed in to change notification settings - Fork 11
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
使用vite-plugin-lib-assets后vue单文件组件中scss中的图片仍然被内联了 #2
Labels
bug
Something isn't working
Comments
我看下这个问题 |
看起来这是需要 // posscss.config.js
const path = require('node:path')
module.exports = {
plugins: [
require('postcss-url')({
url: 'copy',
// base path to search assets from
basePath: path.resolve('./'),
// dir to copy assets
assetsPath: 'img',
// using hash names for assets (generates from asset content)
useHash: true,
}),
],
} |
我想了下,似乎可以在最终生成 |
coder-layne
added a commit
that referenced
this issue
Jul 23, 2023
验证下来这个方案是可行的,不过存在一个缺陷:引入资源在转换成 base64 时丢失了 |
Supported in v0.3.0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
vite.config.js:
组件代码:
结果:
The text was updated successfully, but these errors were encountered: