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

add minified js files to the npm package #524

Open
3 tasks done
njzjz opened this issue May 19, 2022 · 2 comments
Open
3 tasks done

add minified js files to the npm package #524

njzjz opened this issue May 19, 2022 · 2 comments
Labels
Feature Request New feature or request

Comments

@njzjz
Copy link
Member

njzjz commented May 19, 2022

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

  • I am using NexT version 8.0 or later.
  • I have already read the relevant documents of Hexo and NexT.
  • 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.

@njzjz njzjz added the Feature Request New feature or request label May 19, 2022
@sghuang19
Copy link
Member

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.

@sghuang19 sghuang19 closed this as not planned Won't fix, can't repro, duplicate, stale Aug 15, 2024
@njzjz
Copy link
Member Author

njzjz commented Aug 15, 2024

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.

hexo-theme-next/_config.yml

Lines 907 to 911 in 0708dc7

vendors:
# The CDN provider of NexT internal scripts.
# Available values: local | jsdelivr | unpkg | cdnjs | custom
# Warning: If you are using the latest master branch of NexT, please set `internal: local`
internal: local

@njzjz njzjz reopened this Aug 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature Request New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants