All Projects β†’ fergaldoyle β†’ vue-template-compiler-loader

fergaldoyle / vue-template-compiler-loader

Licence: MIT license
Webpack loader to pre-compile Vue 2.0 templates

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to vue-template-compiler-loader

angular-hmr-loader
πŸ”₯ Angular HMR Webpack Loader by @AngularClass
Stars: ✭ 32 (+23.08%)
Mutual labels:  webpack-loader
angular-translate-loader
"angular-translate" loader for webpack
Stars: ✭ 15 (-42.31%)
Mutual labels:  webpack-loader
preprocessor-loader
Bring the awesome "Conditional Compilation" to the Webpack, and more.
Stars: ✭ 32 (+23.08%)
Mutual labels:  webpack-loader
webpack-webmanifest-loader
Minimalistic webpack loader to generate webmanifest file (and process icons URLs).
Stars: ✭ 16 (-38.46%)
Mutual labels:  webpack-loader
SPX-GC
SPX is a graphics control client for live video productions and live streams using CasparCG, OBS, vMix, or similar software.
Stars: ✭ 178 (+584.62%)
Mutual labels:  html-templates
lit
Lit is a simple library for building fast, lightweight web components.
Stars: ✭ 12,406 (+47615.38%)
Mutual labels:  html-templates
fengari-loader
Webpack loader for fengari
Stars: ✭ 27 (+3.85%)
Mutual labels:  webpack-loader
nunjucks-loader
Webpack loader for Nunjucks templates
Stars: ✭ 20 (-23.08%)
Mutual labels:  webpack-loader
virtual-dependency-loader
webpack loader that takes a single file, and declare pieces of that file as "dependencies" as if it existed.
Stars: ✭ 33 (+26.92%)
Mutual labels:  webpack-loader
webpack-modernizr-loader
Get your modernizr build bundled with webpack, use modernizr with webpack easily
Stars: ✭ 35 (+34.62%)
Mutual labels:  webpack-loader
next-api-og-image
Easy way to generate open-graph images dynamically in HTML or React using Next.js API Routes. Suitable for serverless environment.
Stars: ✭ 179 (+588.46%)
Mutual labels:  html-templates
webpack-html-boilerplate
Boilerplate for building html templates
Stars: ✭ 17 (-34.62%)
Mutual labels:  html-templates
markup-inline-loader
a webpack loader to embed svg/MathML to html
Stars: ✭ 24 (-7.69%)
Mutual labels:  webpack-loader
lodash-loader
Cherry-picks Lodash functions and require them explicitly to reduce the webpack bundle size.
Stars: ✭ 13 (-50%)
Mutual labels:  webpack-loader
graphql-raw-loader
πŸ– With Webpack, loads GraphQL files as raw strings and handle it's import directive & comment statement.
Stars: ✭ 19 (-26.92%)
Mutual labels:  webpack-loader
css-raw-loader
🌁 CSS Raw loader module for Webpack
Stars: ✭ 13 (-50%)
Mutual labels:  webpack-loader
svelte-loader-hot
Webpack loader for svelte components with HMR support
Stars: ✭ 22 (-15.38%)
Mutual labels:  webpack-loader
React-bookstore
Bookstore using google-book Apis made with reactjsπŸ”₯πŸš€
Stars: ✭ 14 (-46.15%)
Mutual labels:  webpack-loader
graphql-loader
πŸ’ A webpack loader for .graphql documents
Stars: ✭ 60 (+130.77%)
Mutual labels:  webpack-loader
color-loader
🎨 A webpack loader that extracts the color palette of an image
Stars: ✭ 14 (-46.15%)
Mutual labels:  webpack-loader

vue-template-compiler-loader

Webpack loader to pre-compile Vue 2.0 templates.

npm i vue-template-compiler-loader --save-dev

Webpack config

To module.loaders add:

{ test: /\.html$/, loader: 'vue-template-compiler' }

Usage

import template from './template.html'

template will be an object

{
  render: Function,
  staticRenderFns: Array<Function>
}

Set render and staticRenderFns properties on a component e.g:

// manually
import template from './template.html'

export const myComponent = {
  name: 'myComponent',
  render: template.render,
  staticRenderFns: template.staticRenderFns,
  mounted () {}
}



// mixin
import template from './template.html'

export const myComponent = {
  name: 'myComponent',
  mixins: [template],
  mounted () {}
}



// stage2 object spread
import template from './template.html'

export const myComponent = {
  name: 'myComponent',
  ...template,
  mounted () {}
}
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].