3.0.0 • Published 4 years ago

fest-webpack-loader v3.0.0

Weekly downloads
2
License
MIT
Repository
github
Last release
4 years ago

npm package Coverage Status node Build Status Dependencies Status

Fest templates loader for Webpack

This Webpack loader compiles Fest templates.

For Webpack 4.x use loader versions 2.x

Loader is trying to build dependencies tree by walking through <fest:include/>, <fest:insert/> and <fest:script/> tags of template.

When loader emits warning, that means that XML parser failed to parse a file and get dependencies from it. You probably would like to fix file syntax, to have complete experience with webpack rebuild on change.

:exclamation: Using builtin beautifier could break ES syntax in scripts, that is inlined via <fest:script/>. Consider switching off beautify option.

Install

npm install --save-dev fest-webpack-loader

Usage

All referenced templates compiles to ES modules.

import template from './template.xml';

webpack.config.js

module.exports = {
  module: {
    rules: [
      {
        test: /\.xml$/,
        use: [
          {
            loader: 'fest-webpack-loader'
          }
        ]
      }
    ]
  }
}

Options

NameTypeDefaultDescription
beautify{Boolean}falseBeautify compiled template. Built-in fest beautifier breaks ES syntax.
trackDependencies{Boolean}true for development mode otherwise falseEnable template dependencies tracking
module{String}esCompiled template module type. es or cjs.
3.0.0

4 years ago

2.3.0

4 years ago

2.2.1

4 years ago

2.2.2

4 years ago

2.2.0

4 years ago

2.1.4

4 years ago

2.1.3

4 years ago

2.1.2

4 years ago

2.1.0

4 years ago

2.0.0

5 years ago

1.1.1

6 years ago

1.1.0

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago