vuepress打包报错【已解决】

简介: vuepress打包报错【已解决】

异常信息

PS E:\myworkpace\blog\JavaPub-Blog> yarn docs:build
yarn run v1.22.18
$ vuepress build docs
info Initializing VuePress and preparing data...
⠦ Compiling with viteUse of eval is strongly discouraged, as it poses security risks and may cause issues with minification
Use of eval is strongly discouraged, as it poses security risks and may cause issues with minification
⠼ Compiling with viteUse of eval is strongly discouraged, as it poses security risks and may cause issues with minification
Use of eval is strongly discouraged, as it poses security risks and may cause issues with minification
⠏ Compiling with vite
(!) Some chunks are larger than 500 KiB after minification. Consider:
- Using dynamic import() to code-split the application
- Use build.rollupOptions.output.manualChunks to improve chunking: https://rollupjs.org/guide/en/#outputmanualchunks
- Adjust chunk size limit for this warning via build.chunkSizeWarningLimit.
✔ Compiling with vite - done
✖ Rendering pages - failed
TypeError: Invalid value used as weak map key
    at WeakMap.set (<anonymous>)
    at normalizePropsOptions (E:\myworkpace\blog\JavaPub-Blog\node_modules\@vue\runtime-core\dist\runtime-core.cjs.prod.js:2755:15)
    at createComponentInstance (E:\myworkpace\blog\JavaPub-Blog\node_modules\@vue\runtime-core\dist\runtime-core.cjs.prod.js:5644:23)
    at renderComponentVNode (E:\myworkpace\blog\JavaPub-Blog\node_modules\@vue\server-renderer\dist\server-renderer.cjs.prod.js:194:22)
    at Object.ssrRenderComponent (E:\myworkpace\blog\JavaPub-Blog\node_modules\@vue\server-renderer\dist\server-renderer.cjs.prod.js:626:12)
    at _sfc_ssrRender$X (E:\myworkpace\blog\JavaPub-Blog\docs\.vuepress\dist\.server\app.js:10145:24)
    at renderComponentSubTree (E:\myworkpace\blog\JavaPub-Blog\node_modules\@vue\server-renderer\dist\server-renderer.cjs.prod.js:266:13)
    at renderComponentVNode (E:\myworkpace\blog\JavaPub-Blog\node_modules\@vue\server-renderer\dist\server-renderer.cjs.prod.js:211:16)
    at renderVNode (E:\myworkpace\blog\JavaPub-Blog\node_modules\@vue\server-renderer\dist\server-renderer.cjs.prod.js:307:22)
    at renderComponentSubTree (E:\myworkpace\blog\JavaPub-Blog\node_modules\@vue\server-renderer\dist\server-renderer.cjs.prod.js:272:13)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

原因

vite打包报错:块的大小超过限制,Some chunks are larger than 500kb after minification

解决

vuepress2.x 是基于 Vue3.x开发,相比 Vuepress1.x 对 html 的使用更严格。如下图所示的非标准 html 标签在开发阶段没问题,编译却无法通过。

<font 标签已弃用

目录
相关文章
|
7月前
|
JavaScript Android开发
AutoJs4.1.0实战教程---js文件打包发布成APK文件
AutoJs4.1.0实战教程---js文件打包发布成APK文件
1021 0
AutoJs4.1.0实战教程---js文件打包发布成APK文件
|
4月前
|
JavaScript
VUE——自动打包并生成dist.zip压缩包
VUE——自动打包并生成dist.zip压缩包
103 0
VUE——自动打包并生成dist.zip压缩包
|
7月前
|
JavaScript 前端开发 Go
8 大博客引擎 jekyll/hugo/Hexo/Pelican/Gatsby/VuePress/Nuxt.js/Middleman 对比
探索各类博客引擎:Jekyll、Hugo、Hexo、Pelican、Gatsby、VuePress、Nuxt.js和Middleman的对比,包括语言、模板引擎、速度、社区活跃度等。了解每种引擎的优缺点,助你选择合适的博客构建工具。查看详细文章以获取更多实战和安装指南。
|
7月前
vue3打包war压缩包配置
vue3打包war压缩包配置
110 0
|
Linux 编译器 C语言
Buildozer打包
Linux环境下将Python代码打包为app
486 0
|
JavaScript
vue之如何打包上传服务器
vue之如何打包上传服务器
在vuecli3怎么提升构建打包速度?
在vuecli3怎么提升构建打包速度?
326 0
|
开发工具 Android开发 iOS开发
给Flutter项目添加.gitignore文件以及如何修改.gitignore文件并生效
flutter项目的开发,一般来说都是与原生开发混合进行的,单纯的flutter开发局限性很大,需要与原生进行配合。
|
JavaScript 中间件