Skip to content

Commit

Permalink
fix: vscode webpack
Browse files Browse the repository at this point in the history
  • Loading branch information
dineug committed Dec 31, 2023
1 parent b46d174 commit 4bd6c13
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import * as Comlink from 'comlink';

import { AppDatabaseService } from '@/services/indexeddb/appDatabaseService';

declare var self: SharedWorkerGlobalScope;
declare let self: SharedWorkerGlobalScope;

const service = new AppDatabaseService();

Expand Down
4 changes: 4 additions & 0 deletions packages/erd-editor-vscode/src/utils/googleAnalytics.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ function getClientId(): Promise<string> {
}

function send(action: string) {
if (process.env.ERD_WEBPACK_MODE !== 'production') {
return;
}

getClientId().then(clientId => {
fetch(
`https://www.google-analytics.com/mp/collect?measurement_id=${measurement_id}&api_secret=${api_secret}`,
Expand Down
1 change: 1 addition & 0 deletions packages/erd-editor-vscode/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ module.exports = (env, argv) => {
plugins: [
new webpack.DefinePlugin({
'process.env.ERD_EDITOR_VSCODE_VERSION': JSON.stringify(pkg.version),
'process.env.ERD_WEBPACK_MODE': JSON.stringify(mode),
}),
].filter(Boolean),
};
Expand Down

0 comments on commit 4bd6c13

Please sign in to comment.