Skip to content

Commit 1498281

Browse files
committed
1.17.7
Fixed #2244 the plugin to create zip for release must be put in the last module, so that all assets are ready.
1 parent e60dbf1 commit 1498281

File tree

2 files changed

+22
-21
lines changed

2 files changed

+22
-21
lines changed

config/webpack.config.js

Lines changed: 20 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@ module.exports = (env, argv) => {
9797
'**/pdf_viewer.html',
9898
]
9999
};
100+
const pluginsForLastModule = [];
100101
if (browser === "chrome") {
101102
pagesCopyOptions.ignore = [];
102103
entry['pages/neovim'] = './src/pages/neovim.js';
@@ -105,6 +106,22 @@ module.exports = (env, argv) => {
105106
}
106107
if (browser !== "safari") {
107108
entry['pages/markdown'] = './src/content_scripts/markdown.js';
109+
if (mode === "production") {
110+
pluginsForLastModule.push(
111+
new FileManagerPlugin({
112+
events: {
113+
onEnd: {
114+
archive: [
115+
{
116+
source: buildPath,
117+
destination: `${buildPath}/sk.zip`
118+
},
119+
],
120+
},
121+
},
122+
})
123+
);
124+
}
108125
} else {
109126
pagesCopyOptions.ignore.push('**/markdown.html');
110127
pagesCopyOptions.ignore.push('**/donation.png');
@@ -177,24 +194,7 @@ module.exports = (env, argv) => {
177194
]
178195
})
179196
]
180-
}];
181-
if (browser !== "safari" && mode === "production") {
182-
modules[0].plugins.push(
183-
new FileManagerPlugin({
184-
events: {
185-
onEnd: {
186-
archive: [
187-
{
188-
source: buildPath,
189-
destination: `${buildPath}/sk.zip`
190-
},
191-
],
192-
},
193-
},
194-
})
195-
);
196-
}
197-
modules.push({
197+
}, {
198198
devtool: false,
199199
output: {
200200
path: buildPath,
@@ -227,9 +227,10 @@ module.exports = (env, argv) => {
227227
extractComments: false,
228228
})],
229229
},
230+
plugins: pluginsForLastModule,
230231
experiments: {
231232
outputModule: true,
232233
}
233-
});
234+
}];
234235
return modules;
235236
};

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "Surfingkeys",
3-
"version": "1.17.6",
3+
"version": "1.17.7",
44
"description": "Map your keys for web surfing, expand your browser with javascript and keyboard.",
55
"main": "background.js",
66
"directories": {
@@ -40,7 +40,7 @@
4040
"copy-webpack-plugin": "^9.0.1",
4141
"documentation": "^13.2.5",
4242
"file-loader": "^6.2.0",
43-
"filemanager-webpack-plugin": "^6.1.7",
43+
"filemanager-webpack-plugin": "^8.0.0",
4444
"jest": "^27.3.1",
4545
"jest-image-snapshot": "^4.5.1",
4646
"npm-run-all": "^4.1.5",

0 commit comments

Comments
 (0)