rollup-plugin-node-externals
Advanced tools
Comparing version 1.0.1 to 1.0.2
'use strict'; | ||
var path = require('path'); | ||
const externals = (options = {}) => { | ||
@@ -12,3 +14,3 @@ const opts = Object.assign({ | ||
let externals = require('builtin-modules'); | ||
const pkg = require('./package.json'); | ||
const pkg = require(path.resolve(process.cwd(), 'package.json')); | ||
externals = externals.concat(opts.deps ? Object.keys(pkg.dependencies || {}) : [], opts.devDeps ? Object.keys(pkg.devDependencies || {}) : [], opts.peerDeps ? Object.keys(pkg.peerDependencies || {}) : [], opts.optDeps ? Object.keys(pkg.optionalDependencies || {}) : []); | ||
@@ -15,0 +17,0 @@ const warnings = []; |
@@ -0,1 +1,3 @@ | ||
import { resolve } from 'path'; | ||
const externals = (options = {}) => { | ||
@@ -10,3 +12,3 @@ const opts = Object.assign({ | ||
let externals = require('builtin-modules'); | ||
const pkg = require('./package.json'); | ||
const pkg = require(resolve(process.cwd(), 'package.json')); | ||
externals = externals.concat(opts.deps ? Object.keys(pkg.dependencies || {}) : [], opts.devDeps ? Object.keys(pkg.devDependencies || {}) : [], opts.peerDeps ? Object.keys(pkg.peerDependencies || {}) : [], opts.optDeps ? Object.keys(pkg.optionalDependencies || {}) : []); | ||
@@ -13,0 +15,0 @@ const warnings = []; |
{ | ||
"name": "rollup-plugin-node-externals", | ||
"version": "1.0.1", | ||
"version": "1.0.2", | ||
"description": "Automatically declare NodeJS built-in modules and npm dependencies as 'external' in Rollup config", | ||
@@ -5,0 +5,0 @@ "main": "dist/externals.cjs.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
8099
109
2