rollup-plugin-esbuild
Advanced tools
Comparing version 1.2.0 to 1.2.1
@@ -9,6 +9,16 @@ "use strict"; | ||
let service; | ||
const stopService = () => { | ||
if (!options.watch && service) { | ||
service.stop(); | ||
service = undefined; | ||
} | ||
}; | ||
// The order is: | ||
// buildStart -> resolveId -> transform -> buildEnd -> renderChunk -> generateBundle | ||
return { | ||
name: 'esbuild', | ||
async buildStart() { | ||
service = await esbuild_1.startService(); | ||
if (!service) { | ||
service = await esbuild_1.startService(); | ||
} | ||
}, | ||
@@ -48,2 +58,8 @@ resolveId(importee, importer) { | ||
}, | ||
buildEnd(error) { | ||
// Stop the service early if there's error | ||
if (error) { | ||
stopService(); | ||
} | ||
}, | ||
async renderChunk(code) { | ||
@@ -67,6 +83,3 @@ if (options.minify && service) { | ||
generateBundle() { | ||
if (!options.watch && service) { | ||
service.stop(); | ||
service = undefined; | ||
} | ||
stopService(); | ||
}, | ||
@@ -73,0 +86,0 @@ }; |
{ | ||
"name": "rollup-plugin-esbuild", | ||
"version": "1.2.0", | ||
"version": "1.2.1", | ||
"main": "dist/index.js", | ||
@@ -5,0 +5,0 @@ "types": "dist/index.d.ts", |
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
6003
105