chrome webpack
This commit is contained in:
parent
711130475c
commit
8cf1539f0f
@ -52,6 +52,25 @@ module.exports = [
|
|||||||
path: path.resolve(__dirname, "dist"),
|
path: path.resolve(__dirname, "dist"),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
mode: "production",
|
||||||
|
target: "web",
|
||||||
|
devtool: "source-map",
|
||||||
|
entry: "./mailgo.chrome.ts",
|
||||||
|
context: path.join(__dirname, "webpack"),
|
||||||
|
module: {
|
||||||
|
rules: mailgoRules,
|
||||||
|
},
|
||||||
|
resolve: {
|
||||||
|
extensions: [".ts", ".js"],
|
||||||
|
},
|
||||||
|
output: {
|
||||||
|
filename: "mailgo.chrome.min.js",
|
||||||
|
library: "mailgo",
|
||||||
|
libraryTarget: "window",
|
||||||
|
path: path.resolve(__dirname, "dist"),
|
||||||
|
},
|
||||||
|
},
|
||||||
{
|
{
|
||||||
mode: "production",
|
mode: "production",
|
||||||
target: "web",
|
target: "web",
|
||||||
|
10
webpack/mailgo.chrome.ts
Normal file
10
webpack/mailgo.chrome.ts
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
// webpack > dist/mailgo.chrome.js
|
||||||
|
// script to add in Chrome extension
|
||||||
|
// https://github.com/manzinello/mailgo-chrome-extension
|
||||||
|
|
||||||
|
import mailgo from "../src/mailgo";
|
||||||
|
|
||||||
|
// check if mailgo HTML is already present in the page
|
||||||
|
let mailgoExists = !!document.getElementById("mailgo");
|
||||||
|
|
||||||
|
if (!mailgoExists) mailgo();
|
@ -1,5 +1,6 @@
|
|||||||
// webpack > dist/mailgo.firefox.js
|
// webpack > dist/mailgo.firefox.js
|
||||||
// script to add in Firefox addon
|
// script to add in Firefox addon
|
||||||
|
// https://github.com/manzinello/mailgo-firefox-addon
|
||||||
|
|
||||||
import mailgo from "../src/mailgo";
|
import mailgo from "../src/mailgo";
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user