@lyracom/properties-loader
v1.0.2
Published
Webpack loader for .properties files
Downloads
9
Readme
@lyracom/properties-loader
Webpack loader for .properties files, based on the properties package.
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§ions!./strings.properties'
Options can be passed with a query parameter, e.g. ?namespaces§ions=false
, or a JSON object, e.g. ?{"namespaces":true,"sections":false}
.
More info here: https://webpack.js.org/concepts/loaders/#inline