diff --git a/gulpfile.js b/gulpfile.js index 675c89d..5a73580 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -1,5 +1,7 @@ const { src, dest, series } = require("gulp"); +const MAILGO_STYLE_TAG = "{{MAILGO_STYLE}}"; + const tsGulp = require("gulp-typescript"); const tsProject = tsGulp.createProject("tsconfig.json"); @@ -33,7 +35,7 @@ function js() { let cssMinContent = fs.readFileSync("dist/mailgo.min.css", "utf8"); return ( src("src/*.ts") - .pipe(replace("MAILGO_STYLE", cssMinContent)) + .pipe(replace(MAILGO_STYLE_TAG, cssMinContent)) .pipe(tsProject()) // .pipe(babel()) .pipe(dest("./")) diff --git a/src/mailgo.ts b/src/mailgo.ts index ba88e34..b945ba4 100644 --- a/src/mailgo.ts +++ b/src/mailgo.ts @@ -827,7 +827,7 @@ const mailgoStyle = (): void => { let mailgoCSS: HTMLStyleElement = createElement("style") as HTMLStyleElement; mailgoCSS.id = "mailgo-style"; mailgoCSS.type = "text/css"; - mailgoCSS.appendChild(createTextNode(`MAILGO_STYLE`)); + mailgoCSS.appendChild(createTextNode(`{{MAILGO_STYLE}}`)); document.head.appendChild(mailgoCSS); };