@lyracom/properties-loader

1.0.2 • Public • Published

@lyracom/properties-loader

Webpack loader for .properties files, based on the properties package.

npm (scoped)

Installation

yarn add -D @lyracom/properties-loader

or

npm install -D @lyracom/properties-loader

Usage

Webpack configuration

module.exports = {
  module: {
    rules: [
      {
        test: /\.properties$/,
        loader: '@lyracom/properties-loader',
        options: {
          namespaces: true,
          sections: true,
          // other properties.parse options...
        },
      },
    ],
  },
}

Webpack inline

import strings from '!@lyracom/properties-loader?namespaces&sections!./strings.properties'

Options can be passed with a query parameter, e.g. ?namespaces&sections=false, or a JSON object, e.g. ?{"namespaces":true,"sections":false}.

More info here: https://webpack.js.org/concepts/loaders/#inline

Package Sidebar

Install

npm i @lyracom/properties-loader

Weekly Downloads

0

Version

1.0.2

License

MIT

Unpacked Size

6.74 kB

Total Files

5

Last publish

Collaborators

  • alexandresoler
  • mage_santana
  • s-yagues
  • yyoyo
  • alacarta
  • alex-fournier
  • moabi
  • gigaga