[Bug] 基础表按需加载,没有使用外部组件,生产环境报错
Open
Nobody has claimed this yet.
bug
- Dominant language
- TypeScript
- Stars
- 3.7k
- Forks
- 486
- Avg merge
- 1d 19h
- Merged PRs (30d)
- 16
Description
Version
latest
Link to Minimal Reproduction
https://stackblitz.com/edit/vitejs-vite-pmvdzmti?file=src%2Fcomponents%2FTest.vue
Steps to Reproduce
1、打开复现链接,执行npm install
2、install成功后再npm run build
3、执行npm run preview进行vite预览,模拟生产环境
Current Behavior
本地运行没有treeShaking,表格渲染正常,vite预览模式下无法渲染,控制台报错。表格基础渲染逻辑是否还存在某些组件强耦合
Expected Behavior
生产环境正常渲染
Environment
- OS:
- Browser:
- Framework:
Any additional comments?
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Open the linked StackBlitz reproduction at src/components/Test.vue and run npm install, npm run build, then npm run preview. Compare the local and production-preview console errors and inspect the table's tree-shaken dependencies. Done means the table renders correctly in the production preview without the external component.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- build-system, frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100