Comparing version 0.0.3 to 0.0.4
@@ -9,2 +9,3 @@ 'use strict'; | ||
const del = require('rollup-plugin-delete'); | ||
const packageJson = require('./packageJson.js'); | ||
@@ -32,3 +33,5 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } | ||
resolveId(source, importer) { | ||
return importer && !/[/^\.{0,2}\//]/.test(source) ? false : null; | ||
if (!importer || source.startsWith("./") || source.startsWith("/") || source.startsWith("../")) | ||
return null; | ||
return false; | ||
} | ||
@@ -54,2 +57,5 @@ }, | ||
const build = await rollup.rollup(inputOptions); | ||
const isTypeModule = (await packageJson.packageJsonPromise).type === "module"; | ||
const cjsEntryFileNames = isTypeModule ? "[name].cjs" : void 0; | ||
const esmEntryFileNames = isTypeModule ? void 0 : "[name].mjs"; | ||
const outputOptions = format === "both" ? [ | ||
@@ -59,2 +65,3 @@ { | ||
dir, | ||
entryFileNames: cjsEntryFileNames, | ||
exports: "auto", | ||
@@ -67,3 +74,3 @@ sourcemap: true, | ||
dir, | ||
entryFileNames: "[name].mjs", | ||
entryFileNames: esmEntryFileNames, | ||
exports: "auto", | ||
@@ -77,3 +84,3 @@ sourcemap: true, | ||
dir, | ||
entryFileNames: format === "esm" ? "[name].mjs" : void 0, | ||
entryFileNames: format === "esm" ? esmEntryFileNames : cjsEntryFileNames, | ||
preserveModules: true, | ||
@@ -80,0 +87,0 @@ exports: "auto", |
{ | ||
"name": "bob-ts", | ||
"version": "0.0.3", | ||
"version": "0.0.4", | ||
"homepage": "https://github.com/PabloSzx/bob-esbuild", | ||
@@ -49,3 +49,5 @@ "bugs": "https://github.com/PabloSzx/bob-esbuild/issues", | ||
}, | ||
"scripts": {} | ||
"scripts": { | ||
"dev": "bob-esbuild watch" | ||
} | ||
} |
Sorry, the diff of this file is not supported yet
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
8459
11
235
2