@ruleenginejs/rule-loader
TypeScript icon, indicating that this package has built-in type declarations

1.0.7 • Public • Published

@ruleenginejs/rule-loader

Rule loader for webpack.

Installation

npm install -D @ruleenginejs/rule-loader

Add Runtime

npm install @ruleenginejs/runtime

Usage

Config

webpack.config.js

module.exports = {
  module: {
    rules: [
      {
        test: /\.rule$/,
        use: '@ruleenginejs/rule-loader'
      }
    ]
  }
};

App.js

import rule from "./bar.rule";

rule.execute();

Options

Name Type Default Description
checkSchema {Boolean} true Enables/disables the validation scheme for the rule files
runtimeModule {String} '@ruleenginejs/runtime' Runtime module name
moduleBaseDir {String} undefined Base path for import modules in rule files
esModule {Boolean} true Enable/disable ES modules syntax

License

Licensed under the MIT License.

Package Sidebar

Install

npm i @ruleenginejs/rule-loader

Weekly Downloads

2

Version

1.0.7

License

MIT

Unpacked Size

5.54 kB

Total Files

5

Last publish

Collaborators

  • nikolaynau