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 标签已弃用

目录
相关文章
Vue3】vite打包报错:块的大小超过限制,Some chunks are larger than 500kb after minification
Vue3】vite打包报错:块的大小超过限制,Some chunks are larger than 500kb after minification
3048 0
|
存储 JavaScript API
vue3+ant design vue 自定义文件上传和自定义上传进度条
1.关键点是Upload组件中customRequest的API,它能通过覆盖默认的上传行为,可以自定义自己的上传实现(具体可看官方文档); 2.通过在Upload组件中绑定progress实现。 下面是详细代码
3191 0
|
JavaScript
Vue使用Element的表格Table显示树形数据,多选框全选无法选中全部节点
Vue使用Element的表格Table显示树形数据,多选框全选无法选中全部节点
616 0
|
JavaScript
vue 报错 Cannot find package ‘unplugin-vue-components‘ 解决
vue 报错 Cannot find package ‘unplugin-vue-components‘ 解决
792 0
|
11月前
|
Rust 前端开发 JavaScript
前端性能革命:WebAssembly在高性能计算中的应用探索
【10月更文挑战第26天】随着Web应用功能的日益复杂,传统JavaScript解释执行模式逐渐成为性能瓶颈。WebAssembly(Wasm)应运而生,作为一种二进制代码格式,支持C/C++、Rust等语言编写的代码在浏览器中高效运行。Wasm不仅提升了应用的执行速度,还具备跨平台兼容性和安全性,显著改善了Web应用的响应速度和用户体验。
273 4
|
10月前
|
Java Maven
Maven编译报错:Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.13.0:compile 解决方案
在执行Maven项目中的`install`命令时,遇到编译插件版本不匹配的错误。具体报错为:`maven-compiler-plugin:3.13.0`要求Maven版本至少为3.6.3。解决方案是将Maven版本升级到3.6.3或降低插件版本。本文详细介绍了如何下载、解压并配置Maven 3.6.3,包括环境变量设置和IDEA中的Maven配置,确保项目顺利编译。
11057 5
Maven编译报错:Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.13.0:compile 解决方案
|
10月前
|
JavaScript 容器
鸿蒙应用开发从入门到入行 - 篇6:数据监听器、滚动、侧滑功能
在本篇文章里,您将掌握监听器、滚动、侧滑等相关内容,助力你开发出更具交互的案例。
172 9
鸿蒙应用开发从入门到入行 - 篇6:数据监听器、滚动、侧滑功能
|
11月前
|
安全 网络安全 数据安全/隐私保护
送你一张免费的通配符证书,解决你的所有问题
在数字化时代,网站安全至关重要。通配符证书作为一种能够覆盖多个子域名的SSL证书,如同“万能帽子”,保护数据安全传输。尤其适合有多子域名的网站,避免网络风险。免费的通配符证书不仅节省成本,且申请简便,安全性高,由权威机构颁发。通过JoySSL平台,注册账号并使用特定注册码,即可轻松获得免费证书,快速完成域名验证与安装部署,保障网站安全。
|
Java 数据库连接 mybatis
成功解决: Invalid bound statement (not found) 在已经使用mybatis的项目里引入mybatis-plus,结果不能共存的解决
这篇文章讨论了在已使用MyBatis的项目中引入MyBatis-Plus后出现的"Invalid bound statement (not found)"错误,并提供了解决方法,主要是通过修改yml配置文件来解决MyBatis和MyBatis-Plus共存时的冲突问题。
成功解决: Invalid bound statement (not found) 在已经使用mybatis的项目里引入mybatis-plus,结果不能共存的解决
|
XML 小程序 JavaScript