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

ENOENT: no such file or directory #14

Open
labbbirder opened this issue Mar 29, 2022 · 0 comments
Open

ENOENT: no such file or directory #14

labbbirder opened this issue Mar 29, 2022 · 0 comments

Comments

@labbbirder
Copy link

labbbirder commented Mar 29, 2022

I am using a simple vite.config.ts like this:

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.

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