rollup-plugin-npm
Advanced tools
Comparing version 1.2.0 to 1.2.1
# rollup-plugin-npm changelog | ||
## 1.2.1 | ||
* Support scoped packages in `skip` option ([#15](https://github.com/rollup/rollup-plugin-npm/issues/15)) | ||
## 1.2.0 | ||
@@ -4,0 +8,0 @@ |
@@ -27,2 +27,7 @@ 'use strict'; | ||
// scoped packages | ||
if (id[0] === '@' && parts.length) { | ||
id += '/' + parts.shift(); | ||
} | ||
if (~skip.indexOf(id)) return null; | ||
@@ -29,0 +34,0 @@ |
@@ -22,2 +22,7 @@ import { resolve, dirname } from 'path'; | ||
// scoped packages | ||
if (id[0] === '@' && parts.length) { | ||
id += '/' + parts.shift(); | ||
} | ||
if (~skip.indexOf(id)) return null; | ||
@@ -24,0 +29,0 @@ |
{ | ||
"name": "rollup-plugin-npm", | ||
"description": "Bundle third-party dependencies in node_modules", | ||
"version": "1.2.0", | ||
"version": "1.2.1", | ||
"devDependencies": { | ||
@@ -6,0 +6,0 @@ "babel-preset-es2015": "^6.3.13", |
@@ -19,5 +19,10 @@ import { dirname, resolve } from 'path'; | ||
resolveId ( importee, importer ) { | ||
const parts = importee.split( /[\/\\]/ ); | ||
const id = parts.shift(); | ||
let parts = importee.split( /[\/\\]/ ); | ||
let id = parts.shift(); | ||
// scoped packages | ||
if ( id[0] === '@' && parts.length ) { | ||
id += `/${parts.shift()}`; | ||
} | ||
if ( ~skip.indexOf(id) ) return null; | ||
@@ -24,0 +29,0 @@ |
9584
165