rollup-plugin-esbuild
Advanced tools
Comparing version 2.4.2 to 2.5.0
@@ -8,3 +8,2 @@ import { Plugin } from 'rollup'; | ||
exclude?: FilterPattern; | ||
watch?: boolean; | ||
sourceMap?: boolean; | ||
@@ -11,0 +10,0 @@ minify?: boolean; |
'use strict'; | ||
function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; } | ||
var fs2 = require('fs'); | ||
var fs2__default = _interopDefault(fs2); | ||
var path = require('path'); | ||
var esbuild = require('esbuild'); | ||
var pluginutils = require('@rollup/pluginutils'); | ||
var JoyCon = _interopDefault(require('joycon')); | ||
var strip = _interopDefault(require('strip-json-comments')); | ||
var JoyCon = require('joycon'); | ||
var strip = require('strip-json-comments'); | ||
const joycon2 = new JoyCon(); | ||
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } | ||
var fs2__default = /*#__PURE__*/_interopDefaultLegacy(fs2); | ||
var JoyCon__default = /*#__PURE__*/_interopDefaultLegacy(JoyCon); | ||
var strip__default = /*#__PURE__*/_interopDefaultLegacy(strip); | ||
const joycon2 = new JoyCon__default['default'](); | ||
joycon2.addLoader({ | ||
test: /\.json$/, | ||
load: async (file) => { | ||
const content = await fs2__default.promises.readFile(file, "utf8"); | ||
return JSON.parse(strip(content)); | ||
const content = await fs2__default['default'].promises.readFile(file, "utf8"); | ||
return JSON.parse(strip__default['default'](content)); | ||
} | ||
@@ -60,3 +63,3 @@ }); | ||
const stopService = () => { | ||
if (!options2.watch && service) { | ||
if (service) { | ||
service.stop(); | ||
@@ -119,3 +122,3 @@ service = void 0; | ||
buildEnd(error) { | ||
if (error) { | ||
if (error && !this.meta.watchMode) { | ||
stopService(); | ||
@@ -141,3 +144,5 @@ } | ||
generateBundle() { | ||
stopService(); | ||
if (!this.meta.watchMode) { | ||
stopService(); | ||
} | ||
} | ||
@@ -144,0 +149,0 @@ }; |
{ | ||
"name": "rollup-plugin-esbuild", | ||
"version": "2.4.2", | ||
"version": "2.5.0", | ||
"main": "dist/index.js", | ||
@@ -19,14 +19,14 @@ "types": "dist/index.d.ts", | ||
"devDependencies": { | ||
"@types/jest": "^26.0.4", | ||
"@types/jest": "^26.0.10", | ||
"@types/mock-fs": "^4.10.0", | ||
"@types/node": "12.12.50", | ||
"esbuild": "^0.6.3", | ||
"jest": "^26.1.0", | ||
"mock-fs": "^4.12.0", | ||
"prettier": "^2.0.5", | ||
"rollup": "^2.21.0", | ||
"rollup-plugin-dts": "^1.4.8", | ||
"ts-jest": "^26.1.2", | ||
"esbuild": "^0.6.15", | ||
"jest": "^26.4.2", | ||
"mock-fs": "^4.13.0", | ||
"prettier": "^2.1.1", | ||
"rollup": "^2.26.8", | ||
"rollup-plugin-dts": "^1.4.10", | ||
"ts-jest": "^26.3.0", | ||
"ts-node": "^8.10.2", | ||
"typescript": "^3.9.6" | ||
"typescript": "^3.9.7" | ||
}, | ||
@@ -33,0 +33,0 @@ "dependencies": { |
@@ -26,3 +26,2 @@ # rollup-plugin-esbuild | ||
exclude: /node_modules/, // default | ||
watch: process.argv.includes('--watch'), | ||
sourceMap: false, // default | ||
@@ -29,0 +28,0 @@ minify: process.env.NODE_ENV === 'production', |
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
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
9781
185
62