Skip to content
This repository has been archived by the owner on Dec 27, 2024. It is now read-only.

Commit

Permalink
fix: text more hooks
Browse files Browse the repository at this point in the history
  • Loading branch information
sircharlo committed Jun 23, 2024
1 parent 4f43c9d commit f5a024b
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 10 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,12 @@ jobs:
GITHUB_TOKEN: ${{ github.token }}
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}

- run: yarn install && yarn global add @sentry/cli
name: Install Sentry CLI
# - run: yarn install && yarn global add @sentry/cli
# name: Install Sentry CLI

# TODO: Eventually switch over to Debug IDs instead of Source Maps by hooking into the Electron build before it's published
# - run: yarn sentry-cli sourcemaps inject ./dist/electron/UnPackaged/assets
# name: Inject Debug IDs into Artifacts

- run: yarn sentry-cli --auth-token ${{ secrets.SENTRY_AUTH_TOKEN }} sourcemaps upload --org 'jw-projects' --project 'mmm-v2' --release ${{ steps.package-version.outputs.version}} .
name: Upload Source Maps to Sentry
# - run: yarn sentry-cli --auth-token ${{ secrets.SENTRY_AUTH_TOKEN }} sourcemaps upload --org 'jw-projects' --project 'mmm-v2' --release ${{ steps.package-version.outputs.version}} .
# name: Upload Source Maps to Sentry
45 changes: 39 additions & 6 deletions quasar.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,14 @@
// https://v2.quasar.dev/quasar-cli-vite/quasar-config-js
// const { sentryVitePlugin } = require('@sentry/vite-plugin');
const { sentryEsbuildPlugin } = require('@sentry/esbuild-plugin');
// use mergeConfig helper to avoid overwriting the default config
const { mergeConfig } = require('vite');

const { configure } = require('quasar/wrappers');
const path = require('path');
// const inject = require('@rollup/plugin-inject')
import { version } from 'package.json';


module.exports = configure(function (/* ctx */) {
return {
Expand Down Expand Up @@ -42,15 +46,30 @@ module.exports = configure(function (/* ctx */) {
chain.plugin('node-polyfill').use(nodePolyfillWebpackPlugin);
},
extendViteConf(viteConf) {
if (!viteConf.optimizeDeps) viteConf.optimizeDeps = {};
// if (!viteConf.optimizeDeps) viteConf.optimizeDeps = {};
// if (!viteConf.optimizeDeps.exclude) viteConf.optimizeDeps.exclude = [
// 'pdfjs-dist',
// ];
if (!viteConf.optimizeDeps.esbuildOptions)
viteConf.optimizeDeps.esbuildOptions = {};
if (!viteConf.optimizeDeps.esbuildOptions.define)
viteConf.optimizeDeps.esbuildOptions.define = {};
viteConf.optimizeDeps.esbuildOptions.define.global = 'window';
viteConf.optimizeDeps = mergeConfig(viteConf, {
esbuildOptions: {
define: {
global: 'window',
},
},
});
viteConf.plugins = mergeConfig(viteConf.plugins, [
sentryEsbuildPlugin({
authToken: process.env.SENTRY_AUTH_TOKEN,
org: 'jw-projects',
project: 'mmm-v2',
release: version,
}),
]);
// if (!viteConf.optimizeDeps.esbuildOptions)
// viteConf.optimizeDeps.esbuildOptions = {};
// if (!viteConf.optimizeDeps.esbuildOptions.define)
// viteConf.optimizeDeps.esbuildOptions.define = {};
// viteConf.optimizeDeps.esbuildOptions.define.global = 'window';
// if (!viteConf.build) viteConf.build = {};
// viteConf.build.sourcemap = true;
// if (!viteConf.build.plugins) viteConf.build.plugins = [];
Expand Down Expand Up @@ -189,6 +208,20 @@ module.exports = configure(function (/* ctx */) {
authToken: process.env.SENTRY_AUTH_TOKEN,
org: 'jw-projects',
project: 'mmm-v2',
release: version,
}),
);
},

extendElectronPreloadConf: (esbuildConf) => {
esbuildConf.sourcemap = true;
if (!esbuildConf.plugins) esbuildConf.plugins = [];
esbuildConf.plugins.push(
sentryEsbuildPlugin({
authToken: process.env.SENTRY_AUTH_TOKEN,
org: 'jw-projects',
project: 'mmm-v2',
release: version,
}),
);
},
Expand Down

0 comments on commit f5a024b

Please sign in to comment.