Skip to content

Commit

Permalink
1.17.7
Browse files Browse the repository at this point in the history
Fixed #2244 the plugin to create zip for release must be put in the last module, so that all assets are ready.
  • Loading branch information
brookhong committed Mar 1, 2025
1 parent e60dbf1 commit 1498281
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 21 deletions.
39 changes: 20 additions & 19 deletions config/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ module.exports = (env, argv) => {
'**/pdf_viewer.html',
]
};
const pluginsForLastModule = [];
if (browser === "chrome") {
pagesCopyOptions.ignore = [];
entry['pages/neovim'] = './src/pages/neovim.js';
Expand All @@ -105,6 +106,22 @@ module.exports = (env, argv) => {
}
if (browser !== "safari") {
entry['pages/markdown'] = './src/content_scripts/markdown.js';
if (mode === "production") {
pluginsForLastModule.push(
new FileManagerPlugin({
events: {
onEnd: {
archive: [
{
source: buildPath,
destination: `${buildPath}/sk.zip`
},
],
},
},
})
);
}
} else {
pagesCopyOptions.ignore.push('**/markdown.html');
pagesCopyOptions.ignore.push('**/donation.png');
Expand Down Expand Up @@ -177,24 +194,7 @@ module.exports = (env, argv) => {
]
})
]
}];
if (browser !== "safari" && mode === "production") {
modules[0].plugins.push(
new FileManagerPlugin({
events: {
onEnd: {
archive: [
{
source: buildPath,
destination: `${buildPath}/sk.zip`
},
],
},
},
})
);
}
modules.push({
}, {
devtool: false,
output: {
path: buildPath,
Expand Down Expand Up @@ -227,9 +227,10 @@ module.exports = (env, argv) => {
extractComments: false,
})],
},
plugins: pluginsForLastModule,
experiments: {
outputModule: true,
}
});
}];
return modules;
};
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "Surfingkeys",
"version": "1.17.6",
"version": "1.17.7",
"description": "Map your keys for web surfing, expand your browser with javascript and keyboard.",
"main": "background.js",
"directories": {
Expand Down Expand Up @@ -40,7 +40,7 @@
"copy-webpack-plugin": "^9.0.1",
"documentation": "^13.2.5",
"file-loader": "^6.2.0",
"filemanager-webpack-plugin": "^6.1.7",
"filemanager-webpack-plugin": "^8.0.0",
"jest": "^27.3.1",
"jest-image-snapshot": "^4.5.1",
"npm-run-all": "^4.1.5",
Expand Down

0 comments on commit 1498281

Please sign in to comment.