Skip to content

Commit

Permalink
fix: html doctype emails
Browse files Browse the repository at this point in the history
  • Loading branch information
lubomirblazekcz committed Dec 20, 2022
1 parent 82a781f commit 3bff405
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@ const plugin = (userOptions = {}) => {
transform: (html, { path }) => {
const paths = userOptions.paths

html = html.replace('<!DOCTYPE html>', userOptions.doctype)

if (paths.length === 0 || paths.filter(p => path.startsWith(`/${p}`)).length === 0) {
return html
}

html = html.replace('<!DOCTYPE html>', userOptions.doctype)

if (userOptions.tables) {
html = html.replaceAll('<table', '<table border="0" cellpadding="0" cellspacing="0"')
}
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
{
"name": "@vituum/vite-plugin-juice",
"version": "0.1.5",
"version": "0.1.6",
"type": "module",
"main": "index.js",
"dependencies": {
"juice": "^8.1.0",
"postcss": "^8.4.19",
"postcss": "^8.4.20",
"postcss-custom-properties": "^13.0.0",
"postcss-html": "^1.5.0"
},
"devDependencies": {
"eslint": "^8.27.0",
"eslint": "^8.30.0",
"eslint-config-standard": "^17.0.0"
},
"files": [
Expand Down

0 comments on commit 3bff405

Please sign in to comment.