-
Notifications
You must be signed in to change notification settings - Fork 923
build: upgrade toolchain #1825
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
Merged
Merged
build: upgrade toolchain #1825
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
麻烦考虑并入以下patch
Subject: [PATCH] patch
---
Index: vue.config.js
===================================================================
diff --git a/vue.config.js b/vue.config.js
deleted file mode 100644
--- a/vue.config.js (revision 16340a187ff843d854a379d258f32ed50d79a9ed)
+++ /dev/null (revision 16340a187ff843d854a379d258f32ed50d79a9ed)
@@ -1,21 +0,0 @@
-module.exports = {
- pages: {
- index: {
- // page 的入口
- entry: "src/options/main.ts",
- title: "PT-Plugin-Plus"
- },
- // 调试页面
- debugger: {
- entry: "src/debugger/index.ts",
- title: "PT-Plugin-Plus Debugger"
- }
- },
- productionSourceMap: false,
- configureWebpack: {
- optimization: {
- // 打包为 Chrome 商店版时不对代码进行压缩混淆
- minimize: !process.env.CHROME_WEB_STORE
- }
- }
-};
Index: tsconfig.json
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/tsconfig.json b/tsconfig.json
--- a/tsconfig.json (revision 16340a187ff843d854a379d258f32ed50d79a9ed)
+++ b/tsconfig.json (date 1714907953235)
@@ -7,6 +7,8 @@
"importHelpers": true,
"moduleResolution": "node",
"experimentalDecorators": true,
+ "resolveJsonModule": true,
+ "resolvePackageJsonImports": true,
"esModuleInterop": true,
"allowSyntheticDefaultImports": true,
"sourceMap": true,
Index: package.json
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/package.json b/package.json
--- a/package.json (revision 16340a187ff843d854a379d258f32ed50d79a9ed)
+++ b/package.json (date 1714908449528)
@@ -78,7 +78,6 @@
"git-rev-sync": "^3.0.2",
"sass": "^1.75.0",
"sass-loader": "^14.2.1",
- "terser-webpack-plugin": "^5.3.10",
"typescript": "^5.4.5",
"vite": "^5.2.10",
"vue-template-compiler": "~2.7.0",
Index: webpack/common.cjs
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/webpack/common.cjs b/webpack/common.cjs
--- a/webpack/common.cjs (revision 16340a187ff843d854a379d258f32ed50d79a9ed)
+++ b/webpack/common.cjs (date 1714908317184)
@@ -1,8 +1,4 @@
const path = require("path");
-// 因第三方库中可能会包含一些特殊字符,导致编译后 Chrome 无法加载的问题,故引入 terser-webpack-plugin 插件
-// Chrome 会报以下错误:无法为内容脚本加载“xxx.js”文件。该文件采用的不是 UTF-8 编码。
-// @see https://stackoverflow.com/questions/55601774/chrome-extension-has-a-content-js-error-about-utf-8
-const TerserPlugin = require("terser-webpack-plugin");
// 用于替换 @ 符号的路径
function resolve(dir) {
@@ -39,14 +35,6 @@
},
// 打包为 Chrome 商店版时不对代码进行压缩混淆
minimize: !process.env.CHROME_WEB_STORE,
- minimizer: [
- new TerserPlugin({
- // 防止因编码问题导致Chrome无法加载插件
- terserOptions: {
- output: {ascii_only: true}
- }
- })
- ]
},
module: {
rules: [
Index: src/options/views/TechnologyStack.vue
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/src/options/views/TechnologyStack.vue b/src/options/views/TechnologyStack.vue
--- a/src/options/views/TechnologyStack.vue (revision 16340a187ff843d854a379d258f32ed50d79a9ed)
+++ b/src/options/views/TechnologyStack.vue (date 1714908042658)
@@ -28,8 +28,8 @@
</template>
<script lang="ts">
import Vue from "vue";
+import {dependencies as rawDependencies} from "@/../package.json";
-const rawDependencies = require('@/../package.json').dependencies;
const dependencies = Object.entries(rawDependencies).map(value => {
const [name, version] = value
return {
@@ -74,7 +74,7 @@
url = cacheDependMetaData[name]
} else {
try {
- const req = await fetch(`https://registry.npm.taobao.org/${name}`)
+ const req = await fetch(`https://registry.npmmirror.com/${name}`)
const data = await req.json()
if (data?.homepage) {
url = cacheDependMetaData[name] = data?.homepage |
Rhilip
approved these changes
May 5, 2024
Rhilip
approved these changes
May 5, 2024
Rhilip
added a commit
that referenced
this pull request
May 5, 2024
This was referenced May 5, 2024
Closed
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
把编译工具链升级到vite和webpack5
之前的vue-cli已经弃用了,有的依赖已经无法在node20(current lts)上安装了。
本PR升级了编译工具链,把ci的版本也升级到了node20.
可以正常构建,但是还有一些升级ts导致的类型问题,以及升级eslint导致的lint错误。如果修复的话会导致修改非常多的文件,所以等后面再修复。