Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Option to receive the filename (__file) when importing a vue component in production builds #5071

Closed
4 tasks done
JohMun opened this issue Sep 24, 2021 · 1 comment
Closed
4 tasks done

Comments

@JohMun
Copy link

JohMun commented Sep 24, 2021

Clear and concise description of the problem

I would like to switch to vite, but in my applications I use the __file property when importing vue components in production mode. Currently I use webpack in combination with vue-loader, which allows such a setting (exposeFilename). So it would be really cool if the vue plugin for vite would also allow this option.

Suggested solution

I think this would be the condition to adjust.

Alternative

No response

Additional context

No response

Validations

@sapphi-red
Copy link
Member

Closing because #4984 implemented __VUE_PROD_DEVTOOLS__ which covers this.

// vite.config.js
export default defineConfig({
  define: {
    __VUE_PROD_DEVTOOLS__: true
  }
})

@github-actions github-actions bot locked and limited conversation to collaborators Apr 28, 2022
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants