dust-html-loader

dustjs to html loader module for webpack

Usage no npm install needed!

<script type="module">
  import dustHtmlLoader from 'https://cdn.skypack.dev/dust-html-loader';
</script>

README

dust to html loader for webpack

NPM version

Compiles dust templates with partials and exports the compiled HTML, allowing for rendering of the templates to static html files with html-webpack-plugin or passing on to html-loader.

Built for use with the webpack-dev-server testing environment in mind.

Usage

plugins: [
  new HtmlWebpackPlugin({
    filename: 'index.html',
    template: '!!dust-html-loader!src/views/index.dust'
  }),
]

OR

plugins: [
  new HtmlWebpackPlugin({
    filename: 'index.html',
    template: '!!html-loader!dust-html-loader?preLoader=true!src/views/index.dust'
  }),
]

Thanks 🙏♥️

Examples and code fragments used from both dust-loader and dust-loader-complete.