bunchee 2.1.7 → 2.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.js +1 -1
- package/dist/lib.js +5 -3
- package/package.json +1 -1
package/dist/cli.js
CHANGED
package/dist/lib.js
CHANGED
|
@@ -236,6 +236,7 @@ function buildInputConfig(entry, pkg, options, param) {
|
|
|
236
236
|
pkg.name
|
|
237
237
|
] : []));
|
|
238
238
|
var useTypescript = options.useTypescript, runtime = options.runtime, jscTarget = options.target, minify = options.minify;
|
|
239
|
+
var hasSpecifiedTsTarget = Boolean((tsCompilerOptions == null ? void 0 : tsCompilerOptions.target) && tsConfigPath);
|
|
239
240
|
var _obj;
|
|
240
241
|
var plugins = (dtsOnly ? [
|
|
241
242
|
shebang__default["default"](),
|
|
@@ -252,7 +253,7 @@ function buildInputConfig(entry, pkg, options, param) {
|
|
|
252
253
|
target: "esnext",
|
|
253
254
|
module: "esnext",
|
|
254
255
|
incremental: false,
|
|
255
|
-
jsx:
|
|
256
|
+
jsx: tsCompilerOptions.jsx || "react"
|
|
256
257
|
})
|
|
257
258
|
})
|
|
258
259
|
] : [
|
|
@@ -275,8 +276,9 @@ function buildInputConfig(entry, pkg, options, param) {
|
|
|
275
276
|
include: /\.(m|c)?[jt]sx?$/,
|
|
276
277
|
exclude: "node_modules",
|
|
277
278
|
tsconfig: tsConfigPath,
|
|
278
|
-
jsc: _extends$1({
|
|
279
|
-
target: jscTarget
|
|
279
|
+
jsc: _extends$1({}, !hasSpecifiedTsTarget && {
|
|
280
|
+
target: jscTarget
|
|
281
|
+
}, {
|
|
280
282
|
loose: true,
|
|
281
283
|
externalHelpers: false,
|
|
282
284
|
parser: (_obj = {
|