vite-plugin-angular-template-cache
v0.3.0
Published
A Vite plugin that generates AngularJS template cache.
Downloads
40
Maintainers
Readme
Vite Plugin AngularJS Template Cache
This Vite plugin generates AngularJS $templateCache
from HTML files and injects it into your AngularJS application.
Installation
npm install vite-plugin-angular-template-cache --save-dev
In your vite.config.js
:
import angularTemplateCachePlugin from 'vite-plugin-angular-template-cache';
export default {
plugins: [
angularTemplateCachePlugin({
htmlDir: 'src', // Directory containing HTML files
root: process.cwd(), // [OPTIONAL] The root directory of your project
appModule: 'myApp', // [OPTIONAL] the name of the Angular module
entry: 'src/main.js' // [OPTIONAL] Entry file with Angular module declaration to get the module name, if appModule is not specified.
})
]
};