Rollup with inline-js
npm install rollup-plugin-inline-jsrollu-plugin-inline-js
======================



Rollup with inline-js. This might be useful if you build the source with rollup and want to inline some static assets at build-time.
Installation
------------
``
`
npm install -D rollup-plugin-inline-js
`
Usage
-----
js
`
import inline from "rollup-plugin-inline-js";
export default {
input: "entry.js",
output: {
file: "dist/output.js",
format: "es"
},
plugins: [inline()]
};
$inline
This plugin would replace directives in the source, just like inline-js.
.inline.js
Configuration
-------------
The config file works as intended.
`
API
----
This module exports a single function.
$3
js
`
const plugin = createPlugin({
include?: Array
exclude?: Array
inlineOptions?: Object
});
include
Create the plugin instance.
- a list of glob patterns. The plugin would only process matched files. Default to process all files.
exclude
- a list of glob patterns. The plugin would ignore matched files. Default: [].
inlineOptions
The object would be passed to createInliner function.
dependencies
Changelog
---------
* 0.5.0 (Feb 12, 2021)
- Bump dependencies. Upgrade to rollup@2.38.5.
* 0.4.0 (Jun 6, 2019)
- Bump dependencies. Upgrade to rollup@1.14.1.
- Fix: remove deprecated array.
$inline
* 0.3.0 (Aug 5, 2018)
- The plugin had been rewritten and it works in a different way.
- The plugin now transform the source file. So now you can write directives in the source file just like using inline-js CLI.
node.js@8.x
* 0.2.1 (Jul 22, 2018)
- Fix: exclude useless stuff in the package.
* 0.2.0 (Jul 22, 2018)
- Update dependencies. , rollup@>=0.61, inline-js-core@0.4.x`.
* 0.1.0 (Dec 28, 2017)
- First release.