0.0.2 • Published 6 years ago

xml-minify-loader v0.0.2

Weekly downloads
11
License
MIT
Repository
github
Last release
6 years ago

XML Minify Loader

A loader for webpack that lets you import xml files as a string minified.

Install

npm install --save-dev xml-minify-loader

Usage

Use the loader either via your webpack config, CLI or inline.

Via webpack config (recommended)

webpack.config.js

module.exports = {
  module: {
    rules: [
      {
        test: /locale\/messages\.[a-z\-_]+\.xml$/,
        use: 'xml-minify-loader'
      }
    ]
  }
}

In your application

import translations from './locale/messages.fr.xml';

Inline

In your application

import translations from 'xml-minify-loader!./locale/messages.fr.xml';

License

MIT

Credits

This project was built with or inspired by these resources,

pretty-data by Vadim Kiryukhin

raw-loader