-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
bundle webextension-polyfill via webpack
requires another patch to @webextension-toolbox/webextension-toolbox due to default config file path not resolving with find-up (sindresorhus/find-up#36 (comment))
- Loading branch information
Showing
6 changed files
with
59 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
26 changes: 26 additions & 0 deletions
26
...s/@webextension-toolbox+webextension-toolbox+6.2.0+002+fix default config file path.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
diff --git a/node_modules/@webextension-toolbox/webextension-toolbox/dist/command.js b/node_modules/@webextension-toolbox/webextension-toolbox/dist/command.js | ||
index 260881b..598cf0b 100644 | ||
--- a/node_modules/@webextension-toolbox/webextension-toolbox/dist/command.js | ||
+++ b/node_modules/@webextension-toolbox/webextension-toolbox/dist/command.js | ||
@@ -24,7 +24,7 @@ const index_1 = require("./index"); | ||
.command("dev") | ||
.description("Compiles extension in devmode") | ||
.argument("<vendor>", "The Vendor to compile") | ||
- .option("-c, --config [config]", "specify config file path", "./webextension-toolbox.config.js") | ||
+ .option("-c, --config [config]", "specify config file path", "webextension-toolbox.config.js") | ||
.option("-s, --src [src]", "specify source directory", "app") | ||
.option("-t, --target [target]", "specify target directory", "dist/[vendor]") | ||
.option("-d, --devtool [string | false]", "controls if and how source maps are generated", "cheap-source-map") | ||
diff --git a/node_modules/@webextension-toolbox/webextension-toolbox/src/command.ts b/node_modules/@webextension-toolbox/webextension-toolbox/src/command.ts | ||
index 2ea3bec..fc66d72 100644 | ||
--- a/node_modules/@webextension-toolbox/webextension-toolbox/src/command.ts | ||
+++ b/node_modules/@webextension-toolbox/webextension-toolbox/src/command.ts | ||
@@ -30,7 +30,7 @@ import { build, dev } from "./index"; | ||
.option( | ||
"-c, --config [config]", | ||
"specify config file path", | ||
- "./webextension-toolbox.config.js" | ||
+ "webextension-toolbox.config.js" | ||
) | ||
.option("-s, --src [src]", "specify source directory", "app") | ||
.option( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
var webpack = require("webpack"); | ||
|
||
module.exports = { | ||
webpack: (config, { vendor }) => { | ||
if (["chrome", "opera", "edge"].includes(vendor)) { | ||
config.plugins.push( | ||
new webpack.ProvidePlugin({ | ||
browser: "webextension-polyfill", | ||
}), | ||
); | ||
} | ||
|
||
return config; | ||
}, | ||
}; |