-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
添加changelog、修改构建命令,release分支使用命令pnpm run build:release进行构建,其他命令将不会触发sentry的sourcemap提交cc
- Loading branch information
master1lan
committed
Feb 19, 2023
1 parent
0389203
commit e06f400
Showing
8 changed files
with
590 additions
and
54 deletions.
There are no files selected for viewing
File renamed without changes.
This file contains 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,42 @@ | ||
| import { defineConfig } from "vite"; | ||
| import path from "path"; | ||
| import react from "@vitejs/plugin-react-swc"; | ||
| //redictPath | ||
| export const addProjectPath = (originPath: string) => `../${originPath}`; | ||
| import { createHtmlPlugin } from "vite-plugin-html"; | ||
| export default defineConfig({ | ||
| define: { | ||
| __APP_VERSION__: "0.01", | ||
| isdev: true, | ||
| isrelease: false, | ||
| }, | ||
| resolve: { | ||
| alias: { | ||
| "@utils": path.resolve(__dirname, addProjectPath("src/utils")), | ||
| "@components": path.resolve(__dirname, addProjectPath("src/components")), | ||
| "@store": path.resolve(__dirname, addProjectPath("src/store")), | ||
| "@routers": path.resolve(__dirname, addProjectPath("src/routers")), | ||
| "@assets": path.resolve(__dirname, addProjectPath("src/assets")), | ||
| }, | ||
| }, | ||
| plugins: [ | ||
| react(), | ||
| createHtmlPlugin({ | ||
| entry: "src/main.tsx", | ||
| template: "index.html", | ||
| inject: { | ||
| data: { | ||
| injectScript: ``, | ||
| }, | ||
| }, | ||
| }), | ||
| ], | ||
| server: { | ||
| proxy: { | ||
| "/v1": { | ||
| target: "https://api.eoe.best/eoefans-api", | ||
| changeOrigin: true, | ||
| }, | ||
| }, | ||
| }, | ||
| }); |
This file contains 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
This file contains 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,29 @@ | ||
| // packagejson | ||
| import packageJson from "../package.json"; | ||
| //sentry | ||
| import viteSentry from "vite-plugin-sentry"; | ||
|
|
||
| import { defineConfig, mergeConfig } from "vite"; | ||
| import viteMasterConfig, { addProjectPath } from "./vite.master.config"; | ||
| const config = mergeConfig( | ||
| viteMasterConfig, | ||
| defineConfig({ | ||
| define: { | ||
| isrelease: true, | ||
| }, | ||
| plugins: [ | ||
| { | ||
| ...viteSentry({ | ||
| configFile: ".sentryclirc", | ||
| sourceMaps: { | ||
| include: [addProjectPath("./dist/assets")], | ||
| }, | ||
| release: "eoefans-web@" + packageJson.version, | ||
| }), | ||
| apply: "build", | ||
| }, | ||
| ], | ||
| }) | ||
| ); | ||
|
|
||
| export default config; |
This file contains 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
Oops, something went wrong.