Neon loader for webpack
JavaScript
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.gitignore
LICENSE
README.md
index.js
package.json

README.md

neon-loader for webpack

npm version npm monthly downloads npm downloads

Neon loader for webpack using David Matějka's neon-js.

Installation

npm install neon-loader

Usage

Configuration

module.exports = {
	module: {
		rules: [
			{
				test: /\.neon$/,
				use: 'neon-loader'
			}
		]
	}
}
import config from 'config.neon';

CLI

webpack --module-bind 'neon=neon-loader'
import config from 'config.neon';

Inline

import config from 'neon-loader!config.neon');

Options

forceObject

By default, neon-js detects if the loaded file contains a list and returns a JS array if so. You can use this option to force 'neon-js' to transform lists into objects:

import listObject from 'neon-loader?forceObject!list.neon';

License

MIT (http://www.opensource.org/licenses/mit-license.php)