📝 Docs(custom): fix docs typo

This commit is contained in:
Kuingsmile
2024-06-16 21:11:21 +08:00
parent 5af8a6b529
commit dc70648d64
8 changed files with 338 additions and 350 deletions

View File

@@ -6,3 +6,4 @@ src/**/*.js
node_modules
dist
vue.config.js
babel.config.js

69
.vscode/launch.json vendored
View File

@@ -1,36 +1,35 @@
{
"version": "0.2.0",
"configurations": [
{
"name": "Electron: Main",
"type": "node",
"request": "launch",
"protocol": "inspector",
"runtimeExecutable": "${workspaceRoot}/node_modules/.bin/electron",
"windows": {
"runtimeExecutable": "${workspaceRoot}/node_modules/.bin/electron.cmd"
},
"preLaunchTask": "electron-debug",
"args": ["--remote-debugging-port=9223", "./dist_electron"],
"outFiles": ["${workspaceFolder}/dist_electron/**/*.js"]
},
{
"name": "Electron: Renderer",
"type": "chrome",
"request": "attach",
"port": 9223,
"urlFilter": "http://localhost:*",
"timeout": 30000,
"webRoot": "${workspaceFolder}/src",
"sourceMapPathOverrides": {
"webpack:///./src/*": "${webRoot}/*"
}
}
],
"compounds": [
{
"name": "Electron: All",
"configurations": ["Electron: Main", "Electron: Renderer"]
}
]
{
"version": "0.2.0",
"configurations": [
{
"name": "Electron: Main",
"type": "node",
"request": "launch",
"runtimeExecutable": "${workspaceRoot}/node_modules/.bin/electron",
"windows": {
"runtimeExecutable": "${workspaceRoot}/node_modules/.bin/electron.cmd"
},
"preLaunchTask": "electron-debug",
"args": ["--remote-debugging-port=9223", "./dist_electron"],
"outFiles": ["${workspaceFolder}/dist_electron/**/*.js"]
},
{
"name": "Electron: Renderer",
"type": "chrome",
"request": "attach",
"port": 9223,
"urlFilter": "http://localhost:*",
"timeout": 30000,
"webRoot": "${workspaceFolder}/src",
"sourceMapPathOverrides": {
"webpack:///./src/*": "${webRoot}/*"
}
}
],
"compounds": [
{
"name": "Electron: All",
"configurations": ["Electron: Main", "Electron: Renderer"]
}
]
}

View File

@@ -1,33 +1,33 @@
# 贡献指南
## 安装与启动
1. 使用 [yarn](https://yarnpkg.com/) 安装依赖
```bash
yarn install
```
然后通过
```bash
yarn dev
```
启动项目。
2. 只跟 Electron 主进程相关的代码请在 `src/main` 目录下添加。只跟渲染进程相关的代码请在 `src/renderer` 目录下添加。两个进程都能使用的代码请在 `src/universal` 目录下添加。 **注意**:渲染进程没有 `Node.js` 能力,所有渲染进程需要用到 `Node.js` 模块相关的代码请在 `src/main/events/picgoCoreIPC.ts` 下添加事件进行处理。
3. 所有的跨进程事件名请在 `src/universal/events/constants.ts` 里添加。
4. 所有的全局类型定义请在 `src/universal/types/` 里添加,如果是 `enum`,请在 `src/universal/types/enum.ts` 里添加。
5. 与图床管理功能相关的代码请在 `src/main/manage``src/renderer/manage`目录下添加。
## i18n
1.`public/i18n/` 下面创建一种语言的 `yml` 文件,例如 `zh-Hans.yml`。然后参考 `zh-CN.yml` 或者 `en.yml` 编写语言文件。并注意PicList 会通过语言文件中的 `LANG_DISPLAY_LABEL` 向用户展示该语言的名称。
2.`src/universal/i18n/index.ts` 里添加一种默认语言。其中 `label` 就是语言文件中 `LANG_DISPLAY_LABEL` 的值,`value` 是语言文件名。
3. 如果是对已有语言文件进行更新,请在更新完,务必运行一遍 `yarn gen-i18n`,确保能生成正确的语言定义文件。
## 提交代码
1. 请检查代码没有多余的注释、`console.log` 等调试代码。
2. 提交代码前,请执行命令 `git add . && yarn cz`,唤起 [代码提交规范工具](https://github.com/PicGo/bump-version)。通过该工具提交代码。
# 贡献指南
## 安装与启动
1. 使用 [yarn](https://yarnpkg.com/) 安装依赖
```bash
yarn
```
然后通过
```bash
yarn dev
```
启动项目。
1. 只跟 Electron 主进程相关的代码请在 `src/main` 目录下添加。只跟渲染进程相关的代码请在 `src/renderer` 目录下添加。两个进程都能使用的代码请在 `src/universal` 目录下添加。
2. 所有的跨进程事件名请在 `src/universal/events/constants.ts` 里添加。
3. 所有的全局类型定义请在 `src/universal/types/` 里添加,如果是 `enum`,请在 `src/universal/types/enum.ts` 里添加。
4. 与图床管理功能相关的代码请在 `src/main/manage``src/renderer/manage`目录下添加。
## i18n
1.`public/i18n/` 下面创建一种语言的 `yml` 文件,例如 `zh-Hans.yml`。然后参考 `zh-CN.yml` 或者 `en.yml` 编写语言文件。并注意PicList 会通过语言文件中的 `LANG_DISPLAY_LABEL` 向用户展示该语言的名称。
2.`src/universal/i18n/index.ts` 里添加一种默认语言。其中 `label` 就是语言文件中 `LANG_DISPLAY_LABEL` 的值,`value` 是语言文件名。
3. 如果是对已有语言文件进行更新,请在更新完,务必运行一遍 `yarn i18n`,确保能生成正确的语言定义文件。
## 提交代码
1. 请检查代码没有多余的注释、`console.log` 等调试代码。
2. 提交代码前,请执行命令 `git add . && yarn cz`,唤起 [代码提交规范工具](https://github.com/Kuingsmile/node-bump-version)。通过该工具提交代码。

View File

@@ -1,33 +1,33 @@
# Contribution Guidelines
## Installation and startup
1. Use [yarn](https://yarnpkg.com/) to install dependencies
```bash
yarn install
```
then pass
```bash
yarn dev
```
Startup project.
2. Please add code only related to the main process of Electron in the `src/main` directory. Code only related to the rendering process should be added in the `src/renderer` directory. Add code that can be used by both processes in the `src/universal` directory. **Note**: The rendering process does not have the `Node.js` capability. All rendering processes need to use `Node.js modules` related code, please add events under `src/main/events/picgoCoreIPC.ts` for processing.
3. Please add all cross-process event names in `src/universal/events/constants.ts`.
4. Please add all global type definitions in `src/universal/types/`, if it is `enum`, please add it in `src/universal/types/enum.ts`.
5. Code related to the management function of the picture bed should be added in the `src/main/manage` and `src/renderer/manage` directory.
## i18n
1. Create a language `yml` file under `public/i18n/`, for example `zh-Hans.yml`. Then refer to `zh-CN.yml` or `en.yml` to write language files. Also note that PicList will display the name of the language to the user via `LANG_DISPLAY_LABEL` in the language file.
2. Add a default language to `src/universal/i18n/index.ts`. where `label` is the value of `LANG_DISPLAY_LABEL` in the language file, and `value` is the name of the language file.
3. If you are updating an existing language file, be sure to run `yarn gen-i18n` after the update to ensure that the correct language definition file can be generated.
## Submit code
1. Please check that the code has no extra comments, `console.log` and other debugging code.
2. Before submitting the code, please execute the command `git add . && yarn cz` to invoke [Code Submission Specification Tool](https://github.com/PicGo/bump-version). Submit code through this tool.
# Contribution Guidelines
## Installation and startup
1. Use [yarn](https://yarnpkg.com/) to install dependencies
```bash
yarn
```
then pass
```bash
yarn dev
```
Startup project.
1. Please add code only related to the main process of Electron in the `src/main` directory. Code only related to the rendering process should be added in the `src/renderer` directory. Add code that can be used by both processes in the `src/universal` directory.
2. Please add all cross-process event names in `src/universal/events/constants.ts`.
3. Please add all global type definitions in `src/universal/types/`, if it is `enum`, please add it in `src/universal/types/enum.ts`.
4. Code related to the management function of the picture bed should be added in the `src/main/manage` and `src/renderer/manage` directory.
## i18n
1. Create a language `yml` file under `public/i18n/`, for example `zh-Hans.yml`. Then refer to `zh-CN.yml` or `en.yml` to write language files. Also note that PicList will display the name of the language to the user via `LANG_DISPLAY_LABEL` in the language file.
2. Add a default language to `src/universal/i18n/index.ts`. where `label` is the value of `LANG_DISPLAY_LABEL` in the language file, and `value` is the name of the language file.
3. If you are updating an existing language file, be sure to run `yarn i18n` after the update to ensure that the correct language definition file can be generated.
## Submit code
1. Please check that the code has no extra comments, `console.log` and other debugging code.
2. Before submitting the code, please execute the command `git add . && yarn cz` to invoke [Code Submission Specification Tool](https://github.com/Kuingsmile/node-bump-version). Submit code through this tool.

341
FAQ_EN.md
View File

@@ -1,174 +1,167 @@
# FAQ
This FAQ has been modified from PicGo's FAQ, and thanks to the author Molunerfinn for PicGo.
## Common Questions
> Please refer to [user manual](https://piclist.cn/en) for general configuration issues.
## 1. What is the relationship between PicList and PicGo?
PicList is forked from the PicGo project and is based on PicGo for secondary development. At the same time, the core function kernel PicGo-Core has been developed for the second time and renamed as [PicList-Core](https://github.com/Kuingsmile/PicList-Core).
The addition of all new features to PicList has not affected PicGo's existing functions, so you can use all PicGo plugins in PicList. At the same time, it can still be used in conjunction with software such as Typora and Obsidian.
## 2. When using the image hosting management function, errors such as "unable to retrieve directory" occur
Please check the log file `manage.log`. In addition, the API calls of various platforms have a limit on the number of calls per hour. If an error occurs, please try again later.
## 3. Which remote image hosting deletion is supported?
Currently, the supported image hosting platforms are:
- Aliyun OSS
- Tencent Cloud COS
- Qiniu Cloud Kodo
- Upyun
- SM.MS
- Imgur
- GitHub
- Webdav
- Aws S3
- Local path
- Built-in SFTP
- Doge Cloud
- Huawei Cloud OBS
- Alist
- Lsky Pro
## 4. Is it possible to upload video files?
Yes. With the newly added image hosting management function, you can upload files of any format, including video files. At the same time, when uploading in the management interface, using methods such as chunked uploading and streaming uploading is faster and more stable compared to the base64 conversion method built into PicGo.
## 5. Does PicList support a certain image hosting platform?
PicList itself supports the following image hosting platforms:
- Qiniu Cloud
- AWS S3 compatible platform
- Tencent Cloud COS
- Upyun
- GitHub
- SM.MS
- Aliyun OSS
- Imgur
- Webdav
- Local path
- SFTP
- Telegra.ph
- Lsky Pro
- PicList (nested)
PicList plans to integrate and optimize existing plugins and embed more commonly used image hosting platforms.
In addition, PicList is compatible with PicGo's plugin system. If you need support for other image hosting platforms, you can refer to the [PicGo third-party plugins](https://github.com/PicGo/Awesome-PicGo). If you still cannot find the image hosting platform you need, please develop a plugin for everyone to use.
## 6. The GitHub image hosting platform sometimes uploads successfully and sometimes fails
The problem with GitHub servers and China's Great Firewall may cause successful or failed uploads. There is no solution.
If you want stability, please use paid cloud storage such as Aliyun and Tencent Cloud. The price is not expensive.
## 7. The main window interface of PicList cannot be opened on Mac
To open the main window, right-click or two-finger tap the PicList icon in the top bar and select "Open Main Window."
Or right-click the PicList icon in the dock and select "Open Main Window."
## 8. 上传失败,或者是服务器出错
1. PicList 自带的图床都经过测试,上传出错一般都不是 PicList 自身的原因。如果你用的是 GitHub 图床请参考上面的第 7 点。
2. 检查 PicList 的日志(报错日志可以在 PicList 设置 -> 设置日志文件 -> 点击打开 后找到),看看 `[PicList Error]` 的报错信息里有什么关键信息
1. 先自行搜索 error 里的报错信息,往往你能百度或者谷歌出问题原因,不必开 issue
2. 如果有带有 `401` `403` `40X` 状态码字样的,不用怀疑,就是你配置写错了,仔细检查配置,看看是否多了空格之类的。
3. 如果带有 `HttpError``RequestError` `socket hang up` 等字样的说明这是网络问题我无法帮你解决网络问题请检查你自己的网络是否有代理DNS 设置是否正常等。
3. 通常网络问题引起的上传失败都是因为代理设置不当导致的。如果开启了系统代理,建议同时也在 PicList 的代理设置中设置对应的HTTP代理。
4. PicList's built-in image hosting platforms have been tested, and upload errors are generally not caused by PicList itself. If you are using the GitHub image hosting platform, please refer to the 7th point above.
5. Check PicList's log (the error log can be found by clicking "Open" in PicList Settings -> Set Log File ->), and see if there is any key information in the `[PicList Error]` error message
1. First search for the error message in the error message by yourself, and you can often Baidu or Google the cause of the problem, so you don't need to open an issue.
2. If there are `401`, `403` and other `40X` status code words, don't doubt it, it means that your configuration is wrong, check the configuration carefully to see if there are extra spaces, etc.
3. If there are words such as `HttpError`, `RequestError`, `socket hang up`, etc., it means that this is a network problem, and I cannot help you solve the network problem. Please check your own network, whether there is a proxy, whether the DNS setting is normal, etc.
6. Usually, upload failures caused by network problems are caused by improper proxy settings. If the system proxy is turned on, it is recommended to set the corresponding HTTP proxy in the proxy settings of PicList at the same time.
## 10. After installing the macOS version, there is no main interface
Please find the icon of PicList in the top bar, and then right-click (touchpad two-finger tap, or right-click the mouse) to find the menu of "Open Main Window".
Or right-click on the icon of PicList in the Docker bar to find the menu of "Open Main Window".
## 11. After installing PicList on macOS, it shows "The file is damaged" or there is no response after installing and opening
Please upgrade PicList to version 1.4.1 or above. Starting from 1.4.1, PicList has been signed by Apple and will not have this problem again.
## 12. Watermark is not added normally
Before adding a watermark, PicList will check whether the font file exists. If it does not exist, it will automatically download the font file. However, due to network problems, the font file may fail to download, and the watermark will be skipped.
Please check whether the font file under the corresponding path according to your system exists. If it does not exist, please download the font file manually and put it in the corresponding path.
Windows: `%APPDATA%\piclist\assets\simhei.ttf`
Linux: `$XDG_CONFIG_HOME/piclist/assets/simhei.ttf` or `~/.config//assets/simhei.ttf`
MacOS: `~/Library/Application\ Support/picgo/assets/simhei.ttf`
The font file download address: [https://release.piclist.cn/simhei.ttf](https://release.piclist.cn/simhei.ttf)
## 13. Upload failed when using aws-s3 plugin to upload to cloudflare R2
R2's endpoint address will be blocked by GFW sni. After checking piclist.log, adding the corresponding IP address to the proxy list can solve the problem.
## 14. Are all PicGo plugins compatible with PicList?
PicList is compatible with most PicGo plugins. However, since PicList uses an updated version of electron, it is not compatible with the old version of the sharp library, so some plugins may not work.
Known plugins that cannot be used are:
- picgo-plugin-watermark (built-in)
- picgo-plugin-pic-migrater (this plugin will verify the version of PicGo and cannot be used, please use the pic-migrater-piclist plugin)
- picgo-plugin-auto-delete (built-in)
Welcome everyone to test other plugins. If there are plugins that cannot be used, please open an issue for feedback.
## 15. How to run PicList-core through Docker?
### docker run
Change the `./piclist` to your own path, and change the `piclist123456` to your own secret key.
```bash
docker run -d \
--name piclist \
--restart always \
-p 36677:36677 \
-v "./piclist:/root/.piclist" \
kuingsmile/piclist:latest \
node /usr/local/bin/picgo-server -k piclist123456
```
### docker-compose
download `docker-compose.yml` from piclist-core repo, or copy the following content to `docker-compose.yml`:
```yaml
version: '3.3'
services:
node:
image: 'kuingsmile/piclist:latest'
container_name: piclist
restart: always
ports:
- 36677:36677
volumes:
- './piclist:/root/.piclist'
command: node /usr/local/bin/picgo-server -k piclist123456
```
You can change the `volumes` to your own path and change the `command` to your own secret key.
Then run:
```bash
docker-compose up -d
```
# FAQ
This FAQ has been modified from PicGo's FAQ, and thanks to the author Molunerfinn for PicGo.
## Common Questions
> Please refer to [user manual](https://piclist.cn/en) for general configuration issues.
## 1. What is the relationship between PicList and PicGo?
PicList is forked from the PicGo project and is based on PicGo for secondary development. At the same time, the core function kernel PicGo-Core has been developed for the second time and renamed as [PicList-Core](https://github.com/Kuingsmile/PicList-Core).
The addition of all new features to PicList has not affected PicGo's existing functions, so you can use all PicGo plugins in PicList. At the same time, it can still be used in conjunction with software such as Typora and Obsidian.
## 2. When using the image hosting management function, errors such as "unable to retrieve directory" occur
Please check the log file `manage.log`. In addition, the API calls of various platforms have a limit on the number of calls per hour. If an error occurs, please try again later.
## 3. Which remote image hosting deletion is supported?
Currently, the supported image hosting platforms are:
- Aliyun OSS
- Tencent Cloud COS
- Qiniu Cloud Kodo
- Upyun
- SM.MS
- Imgur
- GitHub
- Webdav
- Aws S3
- Local path
- Built-in SFTP
- Doge Cloud
- Huawei Cloud OBS
- Alist
- Lsky Pro
## 4. Is it possible to upload video files?
Yes. With the newly added image hosting management function, you can upload files of any format, including video files. At the same time, when uploading in the management interface, using methods such as chunked uploading and streaming uploading is faster and more stable compared to the base64 conversion method built into PicGo.
## 5. Does PicList support a certain image hosting platform?
PicList itself supports the following image hosting platforms:
- Qiniu Cloud
- AWS S3 compatible platform
- Tencent Cloud COS
- Upyun
- GitHub
- SM.MS
- Aliyun OSS
- Imgur
- Webdav
- Local path
- SFTP
- Telegra.ph
- Lsky Pro
- PicList (nested)
PicList plans to integrate and optimize existing plugins and embed more commonly used image hosting platforms.
In addition, PicList is compatible with PicGo's plugin system. If you need support for other image hosting platforms, you can refer to the [PicGo third-party plugins](https://github.com/PicGo/Awesome-PicGo). If you still cannot find the image hosting platform you need, please develop a plugin for everyone to use.
## 6. The GitHub image hosting platform sometimes uploads successfully and sometimes fails
The problem with GitHub servers and China's Great Firewall may cause successful or failed uploads. There is no solution.
If you want stability, please use paid cloud storage such as Aliyun and Tencent Cloud. The price is not expensive.
## 7. The main window interface of PicList cannot be opened on Mac
To open the main window, right-click or two-finger tap the PicList icon in the top bar and select "Open Main Window."
Or right-click the PicList icon in the dock and select "Open Main Window."
## 8. Upload failed, or server error
1. PicList's built-in image hosting platforms have been tested, and upload errors are generally not caused by PicList itself. If you are using the GitHub image hosting platform, please refer to the 7th point above.
2. Check PicList's log (the error log can be found by clicking "Open" in PicList Settings -> Set Log File ->), and see if there is any key information in the `[PicList Error]` error message
1. First search for the error message in the error message by yourself, and you can often Baidu or Google the cause of the problem, so you don't need to open an issue.
2. If there are `401`, `403` and other `40X` status code words, don't doubt it, it means that your configuration is wrong, check the configuration carefully to see if there are extra spaces, etc.
3. If there are words such as `HttpError`, `RequestError`, `socket hang up`, etc., it means that this is a network problem, and I cannot help you solve the network problem. Please check your own network, whether there is a proxy, whether the DNS setting is normal, etc.
3. Usually, upload failures caused by network problems are caused by improper proxy settings. If the system proxy is turned on, it is recommended to set the corresponding HTTP proxy in the proxy settings of PicList at the same time.
## 10. After installing the macOS version, there is no main interface
Please find the icon of PicList in the top bar, and then right-click (touchpad two-finger tap, or right-click the mouse) to find the menu of "Open Main Window".
Or right-click on the icon of PicList in the Docker bar to find the menu of "Open Main Window".
## 11. After installing PicList on macOS, it shows "The file is damaged" or there is no response after installing and opening
Please upgrade PicList to version 1.4.1 or above. Starting from 1.4.1, PicList has been signed by Apple and will not have this problem again.
## 12. Watermark is not added normally
Before adding a watermark, PicList will check whether the font file exists. If it does not exist, it will automatically download the font file. However, due to network problems, the font file may fail to download, and the watermark will be skipped.
Please check whether the font file under the corresponding path according to your system exists. If it does not exist, please download the font file manually and put it in the corresponding path.
Windows: `%APPDATA%\piclist\assets\simhei.ttf`
Linux: `$XDG_CONFIG_HOME/piclist/assets/simhei.ttf` or `~/.config//assets/simhei.ttf`
MacOS: `~/Library/Application\ Support/picgo/assets/simhei.ttf`
The font file download address: [https://release.piclist.cn/simhei.ttf](https://release.piclist.cn/simhei.ttf)
## 13. Upload failed when using aws-s3 plugin to upload to cloudflare R2
R2's endpoint address will be blocked by GFW sni. After checking piclist.log, adding the corresponding IP address to the proxy list can solve the problem.
## 14. Are all PicGo plugins compatible with PicList?
PicList is compatible with most PicGo plugins. However, since PicList uses an updated version of electron, it is not compatible with the old version of the sharp library, so some plugins may not work.
Known plugins that cannot be used are:
- picgo-plugin-watermark (built-in)
- picgo-plugin-pic-migrater (this plugin will verify the version of PicGo and cannot be used, please use the pic-migrater-piclist plugin)
- picgo-plugin-auto-delete (built-in)
Welcome everyone to test other plugins. If there are plugins that cannot be used, please open an issue for feedback.
## 15. How to run PicList-core through Docker?
### docker run
Change the `./piclist` to your own path, and change the `piclist123456` to your own secret key.
```bash
docker run -d \
--name piclist \
--restart always \
-p 36677:36677 \
-v "./piclist:/root/.piclist" \
kuingsmile/piclist:latest \
node /usr/local/bin/picgo-server -k piclist123456
```
### docker-compose
download `docker-compose.yml` from piclist-core repo, or copy the following content to `docker-compose.yml`:
```yaml
version: '3.3'
services:
node:
image: 'kuingsmile/piclist:latest'
container_name: piclist
restart: always
ports:
- 36677:36677
volumes:
- './piclist:/root/.piclist'
command: node /usr/local/bin/picgo-server -k piclist123456
```
You can change the `volumes` to your own path and change the `command` to your own secret key.
Then run:
```bash
docker-compose up -d
```

View File

@@ -1,5 +1,5 @@
module.exports = {
plugins: {
autoprefixer: {},
},
};
autoprefixer: {}
}
}

View File

@@ -1,66 +1,66 @@
{
"compilerOptions": {
"target": "es2019", // https://github.com/TypeStrong/ts-loader/issues/1061
"module": "esnext",
"strict": true,
"jsx": "preserve",
"importHelpers": true,
"moduleResolution": "node",
"resolveJsonModule": true,
"esModuleInterop": true,
"experimentalDecorators": true,
"allowSyntheticDefaultImports": true,
"sourceMap": true,
"baseUrl": ".",
"types": [
"webpack-env",
"element-plus/global",
"vue3-photo-preview",
"node"
],
"typeRoots": [
"./src/universal/types/",
"./node_modules/@types",
"./node_modules",
],
"paths": {
"@/*": [
"src/renderer/*"
],
"~/*": [
"src/main/*"
],
"root/*": [
"./*"
],
"#/*": [
"src/universal/*"
],
"apis/*": [
"src/main/apis/*"
],
"@core/*": [
"src/main/apis/core/*"
]
},
"lib": [
"esnext",
"dom",
"dom.iterable",
"scripthost"
]
},
"include": [
"src/**/*.ts",
"src/**/*.tsx",
"src/**/*.vue",
"tests/**/*.ts",
"tests/**/*.tsx"
],
"exclude": [
"node_modules"
],
"vueCompilerOptions": {
"target": 3,
}
}
{
"compilerOptions": {
"target": "es2019", // https://github.com/TypeStrong/ts-loader/issues/1061
"module": "esnext",
"strict": true,
"jsx": "preserve",
"importHelpers": true,
"moduleResolution": "node",
"resolveJsonModule": true,
"esModuleInterop": true,
"experimentalDecorators": true,
"allowSyntheticDefaultImports": true,
"sourceMap": true,
"baseUrl": ".",
"types": [
"webpack-env",
"element-plus/global",
"vue3-photo-preview",
"node"
],
"typeRoots": [
"./src/universal/types/",
"./node_modules/@types",
"./node_modules",
],
"paths": {
"@/*": [
"src/renderer/*"
],
"~/*": [
"src/main/*"
],
"root/*": [
"./*"
],
"#/*": [
"src/universal/*"
],
"apis/*": [
"src/main/apis/*"
],
"@core/*": [
"src/main/apis/core/*"
]
},
"lib": [
"esnext",
"dom",
"dom.iterable",
"scripthost"
]
},
"include": [
"src/**/*.ts",
"src/**/*.tsx",
"src/**/*.vue",
"tests/**/*.ts",
"tests/**/*.tsx"
],
"exclude": [
"node_modules"
],
"vueCompilerOptions": {
"target": 3,
}
}

View File

@@ -13,15 +13,10 @@ const config = {
.set('~', resolve('src/main'))
.set('root', resolve('./'))
.set('#', resolve('src/universal'))
// define
// config.plugin('define')
// .tap(args => {
// return args
// })
},
pluginOptions: {
electronBuilder: {
nodeIntegration: true, // will remove in the future
nodeIntegration: true,
customFileProtocol: 'picgo://./',
externals: ['piclist'],
chainWebpackMainProcess: config => {