Awesome
parcel-plugin-eft
Add ef.js template support for parcel bundler.
Install
Install via yarn:
yarn add --dev parcel-plugin-eft
or via npm:
npm install --save-dev parcel-plugin-eft
Usage
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})
Typescript Shims
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;
}