This is my first attempt to use Heml as a NPM module to run with Vue.js. My plan is build a visual interface to create emails and output HTML+CSS using Heml. But I'm stuck in an error after import the lib and initialize it.
import Vue from 'vue'
import App from './App.vue'
import Heml from 'heml'
Vue.config.productionTip = false
new Vue({
render: h => h(App)
}).$mount('#app')
const heml = new Heml;
const options = {
validate: 'soft', // validation levels - 'strict'|'soft'|'none'
cheerio: {}, // config passed to cheerio parser
juice: {},
beautify: {}, // config passed to js-beautify html method
elements: [
// any custom elements you want to use
]
};
heml('<heml> <head> <subject>My Email</subject> </head> <body> <container> <row> <column><p>hi there!</p></column> </row> </container> </body> </heml>', options).then(({ html, metadata, errors }) => { console.log(html)})
This code return an error related to pollyfill.js
Uncaught TypeError: Cannot read property 'match' of undefined
This is my first attempt to use Heml as a NPM module to run with Vue.js. My plan is build a visual interface to create emails and output HTML+CSS using Heml. But I'm stuck in an error after import the lib and initialize it.
This code return an error related to pollyfill.js