add minified js files to the npm package
Please follow this Issue template to provide relevant information, such as source code repository, website URL and screenshots, which will help us investigate. 请按照此 Issue 模版提供相关信息,例如源码仓库、网站链接和屏幕截图,这将有助于我们进行调查。
Issue Checklist
- [x] I am using NexT version 8.0 or later.
- [x] I have already read the relevant documents of Hexo and NexT.
- [x] I have already searched for current issues, which does not help me.
Expected behavior
Add minified js files to the npm package, so we can use the minified files from unpkg. Currently, only jsdelivr and cdnjs (and their mirrors) supports minified files.
Maybe we can execute webpack before npm publish? It should be devDependencies.
The only valid use case I can think of is speeding up building in CI env? But that doesn't make sense either, since dependencies are likely to be cached.
I'm closing this as not planned for now, but feel free to add your thoughts to it or reopen.
The only valid use case I can think of is speeding up building in CI env?
This is useful when vendors.internal is set to unpkg. The JS files will not built during the CI env, but are directly fetched from
the unpkg CDN.
https://github.com/next-theme/hexo-theme-next/blob/0708dc7e18cc06a80204c0d173799dabcc45a084/_config.yml#L907-L911