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

[建议] 使用 Webpack 和其它工具打包和处理代码 #502

Open
lingbopro opened this issue Dec 1, 2024 · 10 comments
Open

[建议] 使用 Webpack 和其它工具打包和处理代码 #502

lingbopro opened this issue Dec 1, 2024 · 10 comments

Comments

@lingbopro
Copy link
Contributor

描述

现在这个项目开发难度很大,JS 和 CSS 全挤在一起

用 Webpack 打包的话就可以随意拆分了,反正最后打包都是一个JS和一个CSS

引入其它库也会方便很多

方案

引入 Webpack 即可

其他

先别关,我可能也许大概应该可以搞一下

@lingbopro
Copy link
Contributor Author

还有以下这些工具可用:

  • Babel:编译代码,增强兼容性
  • Terser 和类似的压缩器:压缩代码,增强加载速度
  • 等等...

总之好就对了

@lingbopro lingbopro changed the title [建议] 使用 Webpack 打包代码 [建议] 使用 Webpack 和其它工具打包和处理代码 Dec 1, 2024
@Mbilse
Copy link

Mbilse commented Dec 1, 2024

描述

现在这个项目开发难度很大,JS 和 CSS 全挤在一起

用 Webpack 打包的话就可以随意拆分了,反正最后打包都是一个JS和一个CSS

引入其它库也会方便很多

方案

引入 Webpack 即可

其他

先别关,我可能也许大概应该可以搞一下

就是像引入giscus一样?

@lingbopro
Copy link
Contributor Author

就是像引入giscus一样?

@Mbilse
Copy link

Mbilse commented Dec 1, 2024

就是像引入giscus一样?

giscus,...

@ProgramCX
Copy link
Contributor

描述

现在这个项目开发难度很大,JS 和 CSS 全挤在一起

用 Webpack 打包的话就可以随意拆分了,反正最后打包都是一个JS和一个CSS

引入其它库也会方便很多

方案

引入 Webpack 即可

其他

先别关,我可能也许大概应该可以搞一下

非常赞成,现在代码真的挺难维护的。把代码模块化有利于提高项目的可维护性和拓展性。现在代码看的眼花缭乱,还得找半天。

@ProgramCX
Copy link
Contributor

ProgramCX commented Jan 21, 2025

到时候部署到Github Pages 创建一个Github Action来负责打包构建到gh-pages分支。把github pages部署分支切换到gh-pages分支,main分支放源代码。

@ProgramCX
Copy link
Contributor

@tjy-gitnub @User782Tec @NB-Group 你们觉得呢

@tjy-gitnub
Copy link
Owner

不慌,我先搜一搜你们在说啥(

@lingbopro
Copy link
Contributor Author

不慌,我先搜一搜你们在说啥(

🤔

@lingbopro
Copy link
Contributor Author

另外其实我觉得 Rollup 比 Webpack 好()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants