mirror of
https://github.com/oven-sh/bun
synced 2026-02-16 22:01:47 +00:00
[bun run] don't parse tsconfig.json for package.json scripts
This commit is contained in:
@@ -482,6 +482,10 @@ pub const RunCommand = struct {
|
||||
|
||||
this_bundler.resolver.care_about_bin_folder = true;
|
||||
this_bundler.resolver.care_about_scripts = true;
|
||||
|
||||
this_bundler.resolver.opts.load_tsconfig_json = false;
|
||||
this_bundler.options.load_tsconfig_json = false;
|
||||
|
||||
this_bundler.configureLinker();
|
||||
|
||||
var root_dir_info = this_bundler.resolver.readDirInfo(this_bundler.fs.top_level_dir) catch |err| {
|
||||
@@ -500,7 +504,7 @@ pub const RunCommand = struct {
|
||||
} else {
|
||||
ctx.log.printForLogLevelWithEnableAnsiColors(Output.errorWriter(), false) catch {};
|
||||
}
|
||||
Output.prettyErrorln("Error loading current directory", .{});
|
||||
Output.prettyErrorln("error loading current directory", .{});
|
||||
Output.flush();
|
||||
return error.CouldntReadCurrentDirectory;
|
||||
};
|
||||
|
||||
@@ -1419,6 +1419,7 @@ pub const BundleOptions = struct {
|
||||
transform_options: Api.TransformOptions,
|
||||
polyfill_node_globals: bool = false,
|
||||
transform_only: bool = false,
|
||||
load_tsconfig_json: bool = true,
|
||||
|
||||
rewrite_jest_for_tests: bool = false,
|
||||
|
||||
|
||||
@@ -3840,7 +3840,7 @@ pub const Resolver = struct {
|
||||
}
|
||||
|
||||
// Record if this directory has a tsconfig.json or jsconfig.json file
|
||||
{
|
||||
if (r.opts.load_tsconfig_json) {
|
||||
var tsconfig_path: ?string = null;
|
||||
if (r.opts.tsconfig_override == null) {
|
||||
if (entries.getComptimeQuery("tsconfig.json")) |lookup| {
|
||||
|
||||
Reference in New Issue
Block a user