Upload source maps to sentry (#810)
* Pretend to upload source maps to sentry * Build release not in docker so we can upload source maps sensibly and also upload the release as a plain tarball while we're at it * fix yaml * Try specifying version this way * test rebuild * pass secrets through * Too many sentries * It's almost 2023 and we're still having BSD vs GNU tar issues * Maybe get sensible tag name & release identifier * Wrong plugin, and also try the 'release' option which might the right thing * Try a different github action see if github likes that any better * add contents write permission and switch to the asset upload plugin that had the helpful doc * actually put release name in tarball path * copy docker config to right path * Prettify vite config * Only activate sentry plugin if we have secrets * Use env var for tag name * Also spelling env correctly would likely help * Fix variable syntax * Put env var in correct place One day maybe I will not find yaml syntax confusing
This commit is contained in:
parent
dc37c83aac
commit
fef503c65d
5 changed files with 62 additions and 19 deletions
|
|
@ -17,24 +17,42 @@ limitations under the License.
|
|||
import { defineConfig, loadEnv } from "vite";
|
||||
import svgrPlugin from "vite-plugin-svgr";
|
||||
import htmlTemplate from "vite-plugin-html-template";
|
||||
import sentryVitePlugin from "@sentry/vite-plugin";
|
||||
|
||||
import path from "path";
|
||||
|
||||
// https://vitejs.dev/config/
|
||||
export default defineConfig(({ mode }) => {
|
||||
const env = loadEnv(mode, process.cwd());
|
||||
|
||||
const plugins = [
|
||||
svgrPlugin(),
|
||||
htmlTemplate.default({
|
||||
data: {
|
||||
title: env.VITE_PRODUCT_NAME || "Element Call",
|
||||
},
|
||||
}),
|
||||
];
|
||||
|
||||
if (
|
||||
process.env.SENTRY_ORG &&
|
||||
process.env.SENTRY_PROJECT &&
|
||||
process.env.SENTRY_AUTH_TOKEN &&
|
||||
process.env.SENTRY_URL
|
||||
) {
|
||||
plugins.push(
|
||||
sentryVitePlugin({
|
||||
include: "./dist",
|
||||
release: process.env.VITE_APP_VERSION,
|
||||
})
|
||||
);
|
||||
}
|
||||
|
||||
return {
|
||||
build: {
|
||||
sourcemap: true,
|
||||
},
|
||||
plugins: [
|
||||
svgrPlugin(),
|
||||
htmlTemplate.default({
|
||||
data: {
|
||||
title: env.VITE_PRODUCT_NAME || "Element Call",
|
||||
},
|
||||
}),
|
||||
],
|
||||
plugins,
|
||||
resolve: {
|
||||
alias: {
|
||||
// matrix-widget-api has its transpiled lib/index.js as its entry point,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue