Commit 3fc75b8b authored by Tasso Evangelista's avatar Tasso Evangelista

Add support for JSON in imports over rollup

parent 4e8a3aa0
......@@ -3,6 +3,7 @@
const path = require('path');
const jetpack = require('fs-jetpack');
const rollup = require('rollup').rollup;
const rollupJson = require('rollup-plugin-json');
const nodeBuiltInModules = ['assert', 'buffer', 'child_process', 'cluster',
'console', 'constants', 'crypto', 'dgram', 'dns', 'domain', 'events',
......@@ -31,7 +32,10 @@ module.exports = function (src, dest, opts) {
input: src,
external: generateExternalModulesList(),
cache: cached[src],
plugins: opts.rollupPlugins,
plugins: [].concat(
opts.rollupPlugins,
rollupJson()
),
})
.then(function (bundle) {
cached[src] = bundle;
......
......@@ -5316,7 +5316,13 @@ rollup-plugin-istanbul@^2.0.1:
istanbul-lib-instrument "^1.9.1"
rollup-pluginutils "^2.0.1"
rollup-pluginutils@^2.0.1:
rollup-plugin-json@^3.1.0:
version "3.1.0"
resolved "https://registry.yarnpkg.com/rollup-plugin-json/-/rollup-plugin-json-3.1.0.tgz#7c1daf60c46bc21021ea016bd00863561a03321b"
dependencies:
rollup-pluginutils "^2.3.1"
rollup-pluginutils@^2.0.1, rollup-pluginutils@^2.3.1:
version "2.3.1"
resolved "https://registry.yarnpkg.com/rollup-pluginutils/-/rollup-pluginutils-2.3.1.tgz#760d185ccc237dedc12d7ae48c6bcd127b4892d0"
dependencies:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment