Skip to content

Commit

Permalink
👷 处理edge商店发布不能包含压缩文件的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
CodFrm committed Feb 28, 2024
1 parent 08778ed commit e5b2e3b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/pkg/utils/monaco-editor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const linterWorker = new Worker("/src/linter.worker.js");
export default function registerEditor() {
// @ts-ignore
window.tsUrl = "";
fetch(chrome.runtime.getURL("/src/ts.worker.js.gz"))
fetch(chrome.runtime.getURL("/src/ts.worker.js"))
.then((resp) => resp.blob())
.then(async (blob) => {
const result = pako.inflate(await blob.arrayBuffer());
Expand Down
3 changes: 2 additions & 1 deletion webpack/webpack.dev.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,8 @@ export default merge(common, {
}),
// firefox商店文件不能大于4M, 所以需要压缩
new CompressionPlugin({
test: /ts.worker.js/,
test: /ts.worker.js$/,
filename: () => "ts.worker.js",
deleteOriginalAssets: true,
}),
new NodePolyfillPlugin(),
Expand Down
3 changes: 2 additions & 1 deletion webpack/webpack.no.split.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@ export default merge(common, {
plugins: [
// firefox商店文件不能大于4M, 所以需要压缩
new CompressionPlugin({
test: /ts.worker.js/,
test: /ts.worker.js$/,
filename: () => "ts.worker.js",
deleteOriginalAssets: true,
}),
],
Expand Down

0 comments on commit e5b2e3b

Please sign in to comment.