fix(global): 指定 core-js,defu 版本,修复启动报错问题

This commit is contained in:
Zeeland 2023-04-06 19:31:55 +08:00
parent cf2da601da
commit 014651e35d
3 changed files with 25 additions and 10 deletions

View File

@ -3,6 +3,7 @@
[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Frymcu%2Fnebula.svg?type=shield)](https://app.fossa.com/projects/git%2Bgithub.com%2Frymcu%2Fnebula?ref=badge_shield) [![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Frymcu%2Fnebula.svg?type=shield)](https://app.fossa.com/projects/git%2Bgithub.com%2Frymcu%2Fnebula?ref=badge_shield)
## 💡 简介 ## 💡 简介
nebula[ˈnebyələ]n.星云)是一款现代化的知识社区项目,使用 Vue + NuxtJS + Element-UI 实现 nebula[ˈnebyələ]n.星云)是一款现代化的知识社区项目,使用 Vue + NuxtJS + Element-UI 实现
与 [forest](https://github.com/rymcu/forest) [ˈfôrəst]n.森林)一起食用,让我们一起探索知识社区的未来。 与 [forest](https://github.com/rymcu/forest) [ˈfôrəst]n.森林)一起食用,让我们一起探索知识社区的未来。
@ -13,7 +14,6 @@ nebula[ˈnebyələ]n.星云)是一款现代化的知识社区项目,
在很多方面受到了 [Symphony](https://github.com/88250/symphony) 的启发,并尝试着在 [Symphony](https://github.com/88250/symphony) 在很多方面受到了 [Symphony](https://github.com/88250/symphony) 的启发,并尝试着在 [Symphony](https://github.com/88250/symphony)
和 [B3log 思想](https://ld246.com/article/1546941897596) 的基础上进一步探索。 和 [B3log 思想](https://ld246.com/article/1546941897596) 的基础上进一步探索。
## ✨ 特性 ## ✨ 特性
- 内容编辑器 - 内容编辑器
@ -93,6 +93,7 @@ nebula[ˈnebyələ]n.星云)是一款现代化的知识社区项目,
在提功能建议前可以先看一下 [计划表](https://rymcu.com/article/29) ,避免重复提议 在提功能建议前可以先看一下 [计划表](https://rymcu.com/article/29) ,避免重复提议
## 鸣谢 ## 鸣谢
- 感谢以下开发者对 Nebula 作出的贡献: - 感谢以下开发者对 Nebula 作出的贡献:
<a href="https://github.com/rymcu/nebula/graphs/contributors"> <a href="https://github.com/rymcu/nebula/graphs/contributors">
@ -102,24 +103,35 @@ nebula[ˈnebyələ]n.星云)是一款现代化的知识社区项目,
- 感谢 `JetBrains` 对本项目的帮助,为作者提供了开源许可版 `JetBrains` 全家桶 - 感谢 `JetBrains` 对本项目的帮助,为作者提供了开源许可版 `JetBrains` 全家桶
![JetBrains](assets/jb_beam.svg) ![JetBrains](assets/jb_beam.svg)
## Build Setup ## Build Setup
```bash ```bash
# install yarn
npm install -g yarn
# install dependencies # install dependencies
$ yarn install yarn install
# serve with hot reload at localhost:3000 # serve with hot reload at localhost:3000
$ yarn run dev yarn run dev
# build for production and launch server # build for production and launch server
$ yarn run build yarn run build
$ yarn run start yarn run start
# generate static project # generate static project
$ yarn run generate yarn run generate
``` ```
> 如果遇到网络超时的问题可以尝试配置国内镜像源:
> `yarn config set registry https://registry.npm.taobao.org`
> 和`npm config set registry https://registry.npm.taobao.org`
## 项目部署 ## 项目部署
1. 关闭本地项目后,在控制台执行 `npm run build` 进行打包 1. 关闭本地项目后,在控制台执行 `npm run build` 进行打包
2. 拷贝以下文件至服务器 2. 拷贝以下文件至服务器
@ -131,8 +143,8 @@ $ yarn run generate
6. 执行 `pm2 list` 检查 `pm2` 是否安装好 6. 执行 `pm2 list` 检查 `pm2` 是否安装好
7. 执行 `pm2 start npm --name nebula -- run start` 7. 执行 `pm2 start npm --name nebula -- run start`
For detailed explanation on how things work, check out [Nuxt.js docs](https://nuxtjs.org). For detailed explanation on how things work, check out [Nuxt.js docs](https://nuxtjs.org).
## License ## License
[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Frymcu%2Fnebula.svg?type=large)](https://app.fossa.com/projects/git%2Bgithub.com%2Frymcu%2Fnebula?ref=badge_large) [![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Frymcu%2Fnebula.svg?type=large)](https://app.fossa.com/projects/git%2Bgithub.com%2Frymcu%2Fnebula?ref=badge_large)

View File

@ -125,7 +125,7 @@ export default {
** See https://nuxtjs.org/api/configuration-build/ ** See https://nuxtjs.org/api/configuration-build/
*/ */
build: { build: {
transpile: [/^element-ui/], transpile: [/^element-ui/,'defu'],
optimization: { optimization: {
splitChunks: { splitChunks: {
minSize: 10000, minSize: 10000,

View File

@ -30,11 +30,14 @@
"stompjs": "^2.3.3", "stompjs": "^2.3.3",
"vditor": "^3.8.18", "vditor": "^3.8.18",
"vue-cropperjs": "^4.2.0", "vue-cropperjs": "^4.2.0",
"vuejs-avataaars": "^4.0.1" "vuejs-avataaars": "^4.0.1",
"core-js": "^2.6.12",
"defu": "^5.0.1"
}, },
"devDependencies": { "devDependencies": {
"@commitlint/cli": "^17.4.0", "@commitlint/cli": "^17.4.0",
"@commitlint/config-conventional": "^17.4.0", "@commitlint/config-conventional": "^17.4.0",
"@nuxt/types": "~2.16.0",
"@nuxtjs/proxy": "^2.1.0", "@nuxtjs/proxy": "^2.1.0",
"conventional-changelog-cli": "^2.2.2", "conventional-changelog-cli": "^2.2.2",
"cz-git": "^1.4.1", "cz-git": "^1.4.1",