关于生产发布打包的问题
Nobody has claimed this yet.
- Dominant language
- Vue
- Stars
- 16.3k
- Forks
- 4.7k
- PR merge metrics
- No merged PRs in 30d
Description
本人在issue当中看到了诸多关于生产打包路径不对,字体图标引用错误的问题.以下是我的解决方案提供给大家参考:
1.webpack.base.config.js
17行修改为: `path: path.resolve(__dirname, '../dist')`
目的:消除冗余dist目录
2.webpack.prod.config.js
21行改为`publicPath: './', // 修改 https://iv...admin 这部分为你的服务器域名`
目的:将静态资源目录改为当前目录
80行改为`filename: './index.html',`
目的:应对上面改动移动入口html 使得入口内引用正确
亲测有效
希望作者能针对开发用户作出良好修以改减少用户使用过程中造成的困惑以及阻碍
Contributor guide
No contributing guide indexed for this repository
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
Read webpack.base.config.js at line 17 and webpack.prod.config.js at lines 21 and 80, then run the production build. Verify that the output has no redundant dist directory and that the generated entry page, static assets, and font icons load from the packaged paths.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- webpack
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 35/100