new firefox in webpack
This commit is contained in:
parent
6f015f2481
commit
9fed283cae
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -37,7 +37,7 @@ module.exports = [
|
|||
mode: "production",
|
||||
target: "web",
|
||||
devtool: "source-map",
|
||||
entry: "./mailgo.direct.ts",
|
||||
entry: "./mailgo.firefox.ts",
|
||||
context: path.join(__dirname, "webpack"),
|
||||
module: {
|
||||
rules: mailgoRules,
|
||||
|
@ -46,7 +46,7 @@ module.exports = [
|
|||
extensions: [".ts", ".js"],
|
||||
},
|
||||
output: {
|
||||
filename: "mailgo.direct.min.js",
|
||||
filename: "mailgo.firefox.min.js",
|
||||
library: "mailgo",
|
||||
libraryTarget: "window",
|
||||
path: path.resolve(__dirname, "dist"),
|
||||
|
|
|
@ -1,6 +0,0 @@
|
|||
// webpack > dist/mailgo.direct.js
|
||||
// useful for some addons like Firefox
|
||||
|
||||
import mailgo from "../src/mailgo";
|
||||
|
||||
mailgo();
|
|
@ -0,0 +1,9 @@
|
|||
// webpack > dist/mailgo.firefox.js
|
||||
// script to add in Firefox addon
|
||||
|
||||
import mailgo from "../src/mailgo";
|
||||
|
||||
// check if mailgo HTML is already present in the page
|
||||
let mailgoExists = !!document.getElementById("mailgo");
|
||||
|
||||
if (!mailgoExists) mailgo();
|
Loading…
Reference in New Issue