mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-17 21:01:26 +02:00
js.Build: Generate tsconfig files
Updates #7777 Added support to allow SourceMap files to be external to the build. In addition added more information when the js compilation has an error. Correctly append sourceMappingURL to output file. Fix merge conflict.
This commit is contained in:
committed by
Bjørn Erik Pedersen
parent
e10e36cf70
commit
3089fc0ba1
@@ -77,4 +77,20 @@ func TestToBuildOptions(t *testing.T) {
|
||||
Sourcemap: api.SourceMapInline,
|
||||
Stdin: &api.StdinOptions{},
|
||||
})
|
||||
|
||||
opts, err = toBuildOptions(Options{
|
||||
Target: "es2018", Format: "cjs", Minify: true, mediaType: media.JavascriptType,
|
||||
SourceMap: "external"})
|
||||
c.Assert(err, qt.IsNil)
|
||||
c.Assert(opts, qt.DeepEquals, api.BuildOptions{
|
||||
Bundle: true,
|
||||
Target: api.ES2018,
|
||||
Format: api.FormatCommonJS,
|
||||
MinifyIdentifiers: true,
|
||||
MinifySyntax: true,
|
||||
MinifyWhitespace: true,
|
||||
Sourcemap: api.SourceMapExternal,
|
||||
Stdin: &api.StdinOptions{},
|
||||
})
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user