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

["__file","*/component.vue"] is added in vite build #410

Closed
9 tasks done
RuthrapathyR opened this issue May 22, 2024 · 1 comment
Closed
9 tasks done

["__file","*/component.vue"] is added in vite build #410

RuthrapathyR opened this issue May 22, 2024 · 1 comment

Comments

@RuthrapathyR
Copy link

Related plugins

Describe the bug

On trying vite build for my vue project in my build.js file i get ["__file","path to my vue componenents"] which is not required please help how to remove that from my build.also referred #11191 this issue which is same as this,tried the solution they gave but it is not working as expected please help.

the solution i tried(not working):
'process.env.NODE_ENV': JSON.stringify('production') added this under definConfig's define object in vite.config.ts .

Reproduction

no url

Steps to reproduce

No response

System Info

System:
    OS: macOS 14.4.1
    CPU: (8) arm64 Apple M1 Pro
    Memory: 290.58 MB / 16.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 21.6.1 - /opt/homebrew/bin/node
    npm: 10.2.4 - /opt/homebrew/bin/npm
  Browsers:
    Brave Browser: 124.1.65.130
    Chrome: 124.0.6367.202
    Safari: 17.4.1
  npmPackages:
    @vitejs/plugin-vue: ^4.1.0 => 4.1.0 
    vite: ^4.5.3 => 4.5.3

Used Package Manager

npm

Logs

No response

Validations

@sxzz
Copy link
Member

sxzz commented May 23, 2024

Try to set environment variable NODE_ENV=production in your shell/terminal instead of vite config.

@sxzz sxzz closed this as not planned Won't fix, can't repro, duplicate, stale May 30, 2024
@github-actions github-actions bot locked and limited conversation to collaborators Jun 14, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants