react-component / pagination

React Pagination
https://pagination-react-component.vercel.app/
MIT License
661 stars 329 forks source link

fix(config): fix dynamic directory issue on windows #519

Closed jonaseriksson84 closed 1 year ago

jonaseriksson84 commented 1 year ago

What is the nature of this change?

πŸ”— Related Issue Related issue fix #516

πŸ’‘ Background and solution of the requirement When doing npm run now-build a directory named like this is created: C:\<project>\node_modules\rc-pagination\dist\~demos\:id This (: in path) is not allowed on Windows, and fails. Same problem happens with Bazel - see this issue for example. When explicitly setting exportStatic to false in the config file, this file is not produced, so that should take care of this issue.

Note, I can't read any kind of Chinese so I don't know for sure what the documentation says about this option: https://v1.d.umijs.org/config#exportstatic

πŸ“ Update log Language Update Description

β˜‘οΈ Self-checklist before requesting a merge ⚠️ Please self-check and tick all options. ⚠️

Documentation is supplemented or not required

vercel[bot] commented 1 year ago

The latest updates on your projects. Learn more about Vercel for Git β†—οΈŽ

Name Status Preview Comments Updated
pagination βœ… Ready (Inspect) Visit Preview πŸ’¬ Add your feedback Mar 17, 2023 at 8:40AM (UTC)
codecov[bot] commented 1 year ago

Codecov Report

Merging #519 (305d18a) into master (e27a1c1) will not change coverage. The diff coverage is n/a.

:exclamation: Current head 305d18a differs from pull request most recent head 802bc33. Consider uploading reports for the commit 802bc33 to get more accurate results

@@           Coverage Diff           @@
##           master     #519   +/-   ##
=======================================
  Coverage   92.87%   92.87%           
=======================================
  Files           4        4           
  Lines         351      351           
  Branches      125      125           
=======================================
  Hits          326      326           
  Misses         25       25           

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more

jonaseriksson84 commented 1 year ago

Thanks for your contribution! But this project is now using dumi 2, and dumi 2 is already exclude dynamic directory for windows, ref

So can you provide detailed errors for your local project if the problem still existing?

Ah ok, this breaks for us on linux when we're using Bazel as mentioned in the PR above. The path with the : would still be produced, but Bazel would refuse to handle that file. I guess I should raise that issue in Dumi instead.

However, I think @yoyo837 's PR https://github.com/react-component/pagination/pull/520 does it more correctly as it doesn't make sense to include dist in the built project, so this one can be closed in favor of that PR.