Add ef.js template support for parcel bundler.
Install via yarn:
yarn add --dev parcel-plugin-eft
or via npm:
npm install --save-dev parcel-plugin-eft
With this plugin set up properly, you can then import any .eft
or .ef
template files directly:
import Hello from './hello.eft'
const helloWorld = new Hello({
$data: {
name: 'World'
}
})
helloWorld.$mount({target: document.body})
Create shims.d.ts
under your project root:
declare module '*.ef' {
const template: any
export default template;
}
declare module '*.eft' {
const template: any
export default template;
}