alloc / alloc/vite-plugin-compress

ENOENT: no such file or directory

未關閉
#14 0 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視
主要語言
TypeScript
星號
133
分支
13
PR 合併指標
30 天內沒有已合併 PR

描述

I am using a simple vite.config.ts like this:
```ts
import type { UserConfig } from 'vite';
import { resolve } from "path";
import vue from '@vitejs/plugin-vue';
import compress from 'vite-plugin-compress'

function pathResolve(dir: string) {
return resolve(process.cwd(), '.', dir);
}

export default {
plugins: [
vue(),
compress()
],
resolve: {
alias: {
"/@": pathResolve('src') + '/',
'vue': 'vue/dist/vue.esm-bundler.js' // 定义vue的别名,如果使用其他的插件,可能会用到别名
},
dedupe: ['vue'],
},
}

```
after `npm run build`, I got the following error:
```
[vite:compress] ENOENT: no such file or directory, open '/404.svg'
file: /404.svg
error during build:
Error: ENOENT: no such file or directory, open '/404.svg'
```
`404.svg` is exactly exist , just under /public.

貢獻指南

這個儲存庫沒有索引到貢獻指南

評估

這個 Issue 還沒有評估資料。

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。