Skip to content

Commit

Permalink
fix: webpack analyzer
Browse files Browse the repository at this point in the history
  • Loading branch information
dineug committed Dec 31, 2023
1 parent f426e3f commit b46d174
Show file tree
Hide file tree
Showing 8 changed files with 13 additions and 47 deletions.
35 changes: 0 additions & 35 deletions .eslintignore

This file was deleted.

3 changes: 1 addition & 2 deletions erd-editor.code-workspace
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,7 @@
},
"typescript.updateImportsOnFileMove.enabled": "always",
"javascript.updateImportsOnFileMove.enabled": "always",
"typescript.enablePromptUseWorkspaceTsdk": true,
"deno.enablePaths": ["./packages-external/erd-editor-app-websocket"]
"typescript.enablePromptUseWorkspaceTsdk": true
},
"extensions": {
"recommendations": [
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"test": "turbo test",
"prepare": "husky install",
"format": "npm run format:eslint && npm run format:prettier",
"format:eslint": "eslint \"**/*.{js,ts}\" --fix",
"format:eslint": "eslint --ignore-path .gitignore \"**/*.{js,ts}\" --fix",
"format:prettier": "prettier \"**/*.{js,ts}\" --write",
"lint": "eslint \"**/*.{js,ts}\""
},
Expand Down
3 changes: 0 additions & 3 deletions packages-external/erd-editor-app-websocket/deno.json

This file was deleted.

3 changes: 0 additions & 3 deletions packages-external/erd-editor-app-websocket/server.ts

This file was deleted.

3 changes: 2 additions & 1 deletion packages/erd-editor-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
"license": "MIT",
"scripts": {
"dev": "webpack serve --mode development",
"build": "webpack --mode production"
"build": "webpack --mode production",
"build:analyzer": "webpack --mode production --env target=analyzer"
},
"dependencies": {
"@dineug/erd-editor": "workspace:*",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,13 @@ export class SchemaService {

async delete(id: string) {
const result = await deleteSchemaEntity(this.db, id);
this.cache.delete(id);
const prev = this.cache.get(id);

if (prev) {
this.cache.delete(id);
prev.store.destroy();
}

return result;
}

Expand Down
3 changes: 2 additions & 1 deletion packages/erd-editor-app/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ module.exports = (env, argv) => {
const isProduction = argv.mode === 'production';
const isDevelopment = argv.mode !== 'production';
const mode = isDevelopment ? 'development' : 'production';
const isAnalyzer = env.target === 'analyzer';

const config = {
mode,
Expand Down Expand Up @@ -158,7 +159,7 @@ module.exports = (env, argv) => {
},
}),
isDevelopment && new ReactRefreshWebpackPlugin(),
// new BundleAnalyzerPlugin(),
isAnalyzer && new BundleAnalyzerPlugin(),
].filter(Boolean),
performance: false,
};
Expand Down

0 comments on commit b46d174

Please sign in to comment.