Giter Club home page Giter Club logo

fest-webpack-loader's Introduction

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.

❗ 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

Name Type Default Description
beautify {Boolean} false Beautify compiled template. Built-in fest beautifier breaks ES syntax.
trackDependencies {Boolean} true for development mode otherwise false Enable template dependencies tracking
module {String} es Compiled template module type. es or cjs.

fest-webpack-loader's People

Contributors

greenkeeper[bot] avatar ogonkov avatar

Stargazers

 avatar

Watchers

 avatar  avatar

fest-webpack-loader's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.