It was merged by accident and the implementation does not look correct.
Fixes #7932
}
opts.sourcefile = ctx.SourcePath
- opts.workDir = t.c.rs.WorkingDir
- opts.resolveDir = opts.workDir
+ opts.resolveDir = t.c.rs.WorkingDir
opts.contents = string(src)
opts.mediaType = ctx.InMediaType
contents string
sourcefile string
resolveDir string
- workDir string
tsConfig string
}
switch opts.SourceMap {
case "inline":
sourceMap = api.SourceMapInline
- case "external":
- // When doing external sourcemaps we should specify
- // out file and no out dir
- sourceMap = api.SourceMapExternal
- outFile = filepath.Join(opts.workDir, opts.TargetPath)
- outDir = ""
case "":
sourceMap = api.SourceMapNone
default:
opts, err = toBuildOptions(Options{
Target: "es2018", Format: "cjs", Minify: true, mediaType: media.JavascriptType,
- SourceMap: "external"})
+ SourceMap: "inline"})
c.Assert(err, qt.IsNil)
c.Assert(opts, qt.DeepEquals, api.BuildOptions{
Bundle: true,
MinifyIdentifiers: true,
MinifySyntax: true,
MinifyWhitespace: true,
- Sourcemap: api.SourceMapExternal,
+ Sourcemap: api.SourceMapInline,
Stdin: &api.StdinOptions{
Loader: api.LoaderJS,
},