init with dark mode
This commit is contained in:
parent
984eb87022
commit
718d009bcc
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -33,6 +33,25 @@ module.exports = [
|
|||
path: path.resolve(__dirname, "dist"),
|
||||
},
|
||||
},
|
||||
{
|
||||
mode: "production",
|
||||
target: "web",
|
||||
devtool: "source-map",
|
||||
entry: "./mailgo.dist.dark.ts",
|
||||
context: path.join(__dirname, "webpack"),
|
||||
module: {
|
||||
rules: mailgoRules,
|
||||
},
|
||||
resolve: {
|
||||
extensions: [".ts", ".js"],
|
||||
},
|
||||
output: {
|
||||
filename: "mailgo.dark.min.js",
|
||||
library: "mailgo",
|
||||
libraryTarget: "window",
|
||||
path: path.resolve(__dirname, "dist"),
|
||||
},
|
||||
},
|
||||
{
|
||||
mode: "production",
|
||||
target: "node",
|
||||
|
|
|
@ -0,0 +1,11 @@
|
|||
// webpack > dist/mailgo.min.js
|
||||
|
||||
import mailgo from "../src/mailgo";
|
||||
|
||||
// call init mailgo attached to the event DOMContentLoaded
|
||||
const mailgoConfig = {
|
||||
initEvent: "DOMContentLoaded",
|
||||
dark: true,
|
||||
};
|
||||
|
||||
mailgo(mailgoConfig);
|
Loading…
Reference in New Issue