Skip to content

Commit

Permalink
build: 🏗️ Fix some build settings.
Browse files Browse the repository at this point in the history
  • Loading branch information
Jisu-Woniu committed Dec 8, 2023
1 parent 343fd12 commit 608f71e
Show file tree
Hide file tree
Showing 9 changed files with 15 additions and 30 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ All notable changes to this project will be documented in this file.
### Build

- :zap: Remove Vue Options API support for space.
- :building_construction: Fix some build settings.

## [1.3.0] - 2023-12-07

Expand Down
8 changes: 1 addition & 7 deletions cliff.toml
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@
# git-cliff ~ default configuration file
# https://git-cliff.org/docs/configuration
#
# Lines starting with "#" are comments.
# Configuration options are organized into tables and keys.
# See documentation for more information on available options.
# git-cliff configuration file

[changelog]
# changelog header
Expand All @@ -12,7 +7,6 @@ header = """
All notable changes to this project will be documented in this file.\n
"""
# template for the changelog body
# https://keats.github.io/tera/docs/#introduction
body = """
{% if version %}\
## [{{ version | trim_start_matches(pat="v") }}] - {{ timestamp | date(format="%Y-%m-%d") }}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
"vue-tsc": "^1.8.25"
},
"browserslist": [
"chrome >= 105",
"edge >= 105",
"safari >= 13"
]
}
8 changes: 4 additions & 4 deletions src-tauri/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion src-tauri/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ license.workspace = true
repository.workspace = true
version.workspace = true

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[build-dependencies]
tauri-build = { version = "1.5.0", features = [] }

Expand Down
4 changes: 0 additions & 4 deletions src-tauri/Tauri.toml
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,6 @@ shortDescription = "A Tauri app for signing files."

[tauri.bundle.windows]

[tauri.bundle.windows.webviewInstallMode]
type = "embedBootstrapper"

[tauri.bundle.windows.nsis]
displayLanguageSelector = true
installMode = "both"
Expand All @@ -48,7 +45,6 @@ language = ["zh-CN", "en-US"]
[[tauri.windows]]
label = "main"
title = "数字签名工具"

fullscreen = false
resizable = true
width = 800
Expand Down
1 change: 0 additions & 1 deletion src-tauri/crypto/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ license.workspace = true
repository.workspace = true
version.workspace = true

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
async-trait = "0.1.74"
chrono = "0.4.31"
Expand Down
2 changes: 0 additions & 2 deletions src-tauri/src/main.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
// Prevents additional console window on Windows in release, DO NOT REMOVE!!
#![cfg_attr(not(debug_assertions), windows_subsystem = "windows")]

// Learn more about Tauri commands at https://tauri.app/v1/guides/features/command

use crate::{
fs::{detect_file_type, get_file_names},
keygen::generate_key_pair,
Expand Down
18 changes: 8 additions & 10 deletions vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,17 @@ import postcssPresetEnv from "postcss-preset-env";
import icons from "unplugin-icons/vite";
import { defineConfig } from "vite";

// https://vitejs.dev/config/
export default defineConfig(async () => ({
plugins: [vue(), icons({ compiler: "vue3" })],

// Vite options tailored for Tauri development and only applied in `tauri dev` or `tauri build`
//
// 1. prevent vite from obscuring rust errors
clearScreen: false,
// 2. tauri expects a fixed port, fail if that port is not available

server: {
host: "127.0.0.1",
port: 1420,
strictPort: true,
},
// 3. to make use of `TAURI_DEBUG` and other env variables
// https://tauri.app/v1/api/config#buildconfig.beforedevcommand

envPrefix: [
"VITE_",
"TAURI_ARCH",
Expand All @@ -41,10 +36,13 @@ export default defineConfig(async () => ({
},
},
build: {
// Tauri uses Chromium on Windows and WebKit on macOS and Linux
target: process.env.TAURI_PLATFORM == "windows" ? "chrome105" : "safari13",
// Tauri uses Edge on Windows and WebKit on macOS and Linux
target: process.env.TAURI_PLATFORM == "windows" ? "edge105" : "safari13",
// produce sourcemaps for debug builds
sourcemap: !!process.env.TAURI_DEBUG,
},
define: { __VUE_OPTIONS_API__: false },
define: {
// Remove Vue Options API support for memory consumption.
__VUE_OPTIONS_API__: false,
},
}));

0 comments on commit 608f71e

Please sign in to comment.