mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-19 21:21:39 +02:00
pipes: Add external source map support to js.Build and Babel
Fixes #8132
This commit is contained in:
@@ -109,4 +109,22 @@ func TestToBuildOptions(t *testing.T) {
|
||||
Loader: api.LoaderJS,
|
||||
},
|
||||
})
|
||||
|
||||
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{
|
||||
Loader: api.LoaderJS,
|
||||
},
|
||||
})
|
||||
}
|
||||
|
Reference in New Issue
Block a user