Core implementation of pectin logic
'use strict';
const pectin = require('@pectin/core');
const cwd = process.cwd(); // default
const pkg = require('./package.json');
const rollupConfig = pectin(pkg, { cwd });
The generated Rollup config is used in both rollup-config-pectin
and @pectin/api
.
Note: This package requires node >=8.9.
To transform SVG imports into inlined data URIs, pass rollup.inlineSVG = true
in your package.json:
{
"name": "my-pkg",
"version": "1.0.0",
"rollup": {
"inlineSVG": true
}
}
If you are using babel-plugin-inline-react-svg in your Babel config you should not configure this option as it will break the plugin.
Check the Pectin project docs for more information.