eval-webpack-plugin

1.1.0 • Public • Published

Eval Webpack Plugin

Create an in-memory webpack module by evaluating a function.

This plugin will re-run the function on a configurable pollInterval, invalidating the compilation and triggering a reload if the return value has changed.

The return value must be JSON-stringifyable.

Example

const EvalWebpackPlugin = require("eval-webpack-plugin");

// ...

plugins: [
  EvalWebpackPlugin("./example.js", () => 42),
  // We can then write require("./example.js") to access the value 42
];

// ...

Related

Readme

Keywords

none

Package Sidebar

Install

npm i eval-webpack-plugin

Weekly Downloads

27

Version

1.1.0

License

MIT

Unpacked Size

2.06 kB

Total Files

3

Last publish

Collaborators

  • dabbott