Skip to content

KingMario/xml-minify-loader

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

XML minify loader for webpack

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published