ci(editor): Start optionally type-checking frontend code during build (no-changelog) (#8787)
This commit is contained in:
committed by
GitHub
parent
a521e7a54d
commit
e374a3667f
@@ -1,6 +1,7 @@
|
||||
import { fileURLToPath, URL } from 'node:url';
|
||||
|
||||
import { defineConfig } from 'vite';
|
||||
import checker from 'vite-plugin-checker';
|
||||
import { resolve } from 'path';
|
||||
import vue from '@vitejs/plugin-vue';
|
||||
import icons from 'unplugin-icons/vite';
|
||||
@@ -9,15 +10,20 @@ import dts from 'vite-plugin-dts';
|
||||
const includeVue = process.env.INCLUDE_VUE === 'true';
|
||||
const srcPath = fileURLToPath(new URL('./src', import.meta.url));
|
||||
|
||||
const plugins = [
|
||||
vue(),
|
||||
icons({
|
||||
compiler: 'vue3',
|
||||
}),
|
||||
dts(),
|
||||
];
|
||||
if (process.env.ENABLE_TYPE_CHECKING === 'true') {
|
||||
plugins.push(checker({ vueTsc: true }));
|
||||
}
|
||||
|
||||
// https://vitejs.dev/config/
|
||||
export default defineConfig({
|
||||
plugins: [
|
||||
vue(),
|
||||
icons({
|
||||
compiler: 'vue3',
|
||||
}),
|
||||
dts(),
|
||||
],
|
||||
plugins,
|
||||
resolve: {
|
||||
alias: {
|
||||
'@': srcPath,
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import vue from '@vitejs/plugin-vue';
|
||||
import { resolve } from 'path';
|
||||
import { defineConfig, mergeConfig } from 'vite';
|
||||
import checker from 'vite-plugin-checker';
|
||||
import { type UserConfig } from 'vitest';
|
||||
import { defineConfig as defineVitestConfig } from 'vitest/config';
|
||||
|
||||
@@ -28,9 +29,14 @@ export const vitestConfig = defineVitestConfig({
|
||||
},
|
||||
}) as UserConfig;
|
||||
|
||||
const plugins = [vue()];
|
||||
if (process.env.ENABLE_TYPE_CHECKING === 'true') {
|
||||
plugins.push(checker({ vueTsc: true }));
|
||||
}
|
||||
|
||||
export default mergeConfig(
|
||||
defineConfig({
|
||||
plugins: [vue()],
|
||||
plugins,
|
||||
resolve: {
|
||||
alias: {
|
||||
'@': resolve(__dirname, 'src'),
|
||||
|
||||
@@ -2,6 +2,7 @@ import vue from '@vitejs/plugin-vue';
|
||||
import { resolve } from 'path';
|
||||
import { defineConfig, mergeConfig } from 'vite';
|
||||
import { sentryVitePlugin } from '@sentry/vite-plugin';
|
||||
import checker from 'vite-plugin-checker';
|
||||
|
||||
import packageJSON from './package.json';
|
||||
import { vitestConfig } from '../design-system/vite.config.mts';
|
||||
@@ -73,8 +74,11 @@ const plugins = [
|
||||
icons({
|
||||
compiler: 'vue3',
|
||||
}),
|
||||
vue()
|
||||
vue(),
|
||||
];
|
||||
if (process.env.ENABLE_TYPE_CHECKING === 'true') {
|
||||
plugins.push(checker({ vueTsc: true }));
|
||||
}
|
||||
|
||||
const { SENTRY_AUTH_TOKEN: authToken, RELEASE: release } = process.env;
|
||||
if (release && authToken) {
|
||||
|
||||
Reference in New Issue
Block a user