Skip to content

Commit 9de4d26

Browse files
chore(config): fix missing module type in package.json and incorrect file paths
- Added missing 'type' field in package.json to specify module type (module/commonjs). - Corrected file paths in webpack.config.js and import statements to ensure proper resolution of files.
1 parent b162b73 commit 9de4d26

File tree

3 files changed

+11
-13
lines changed

3 files changed

+11
-13
lines changed

package.json

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,11 @@
2020
],
2121
"scripts": {
2222
"zip": "node .acode/zip.js",
23-
"build": "webpack --mode development",
23+
"build": "webpack",
2424
"release": "webpack --mode production",
2525
"lint": "npx @biomejs/biome lint --write",
2626
"format": "npx @biomejs/biome format --write"
2727
},
28-
"dependencies": {
29-
"html-tag-js": "^1.8.2"
30-
},
3128
"devDependencies": {
3229
"@babel/cli": "^7.18.10",
3330
"@babel/core": "^7.18.13",
@@ -36,6 +33,7 @@
3633
"@biomejs/biome": "^1.9.4",
3734
"babel-loader": "^9.1.0",
3835
"colors": "^1.4.0",
36+
"html-tag-js": "^1.8.2",
3937
"file-loader": "^6.2.0",
4038
"jszip": "^3.10.1",
4139
"webpack": "^5.76.0",

src/main.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -192,11 +192,11 @@ class WakaTimePlugin {
192192

193193
// Initialize plugin
194194
if (window.acode) {
195-
acode.setPluginInit(
196-
plugin.id,
197-
() => new WakaTimePlugin().init(),
198-
new WakaTimePlugin().settingsObj,
199-
);
200-
201-
acode.setPluginUnmount(plugin.id, () => new AcodeEruda().destroy());
202-
}
195+
196+
const Instance = new WakaTimePlugin();
197+
198+
acode.setPluginInit(plugin.id, () => Instance.init(), Instance.settingsObj);
199+
200+
acode.setPluginUnmount(plugin.id, () => Instance.destroy());
201+
202+
};

webpack.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { resolve } from "node:path";
44
const main = (env, options) => {
55
return {
66
target: "node",
7-
mode: options.mode,
7+
mode: options.mode || 'development',
88
entry: { main: "./src/main.js" },
99
output: {
1010
path: resolve("./", "build"),

0 commit comments

Comments
 (0)