mirror of
https://github.com/swc-project/swc.git
synced 2024-10-05 12:49:21 +03:00
fix(swc): Change default value of inlineSourcesContent
(#2471)
swc: - Make `inlineSourcesContent` `true` by default. (#2470)
This commit is contained in:
parent
c9437d3226
commit
ee880d63ae
@ -86,7 +86,7 @@ it("(async) should handle plugin", async () => {
|
||||
expect(out.code).toBe("");
|
||||
});
|
||||
|
||||
it("(async) should handel dynmic import", async () => {
|
||||
it("(async) should handle dynamic import", async () => {
|
||||
const out = await swc.transform("import('foo');", {
|
||||
jsc: {
|
||||
target: "es3",
|
||||
|
@ -522,7 +522,7 @@ pub struct Config {
|
||||
#[serde(default)]
|
||||
pub source_maps: Option<SourceMapsConfig>,
|
||||
|
||||
#[serde(default)]
|
||||
#[serde(default = "true_by_default")]
|
||||
pub inline_sources_content: bool,
|
||||
}
|
||||
|
||||
|
@ -9,5 +9,8 @@
|
||||
"sources": [
|
||||
"../../input/index.ts"
|
||||
],
|
||||
"sourcesContent": [
|
||||
"import \"./errors.ts\";\n\nfunction a() {\n t();\n}\n\nfunction t(x = false) {\n if (x) {\n throw new Error(\"Hello\");\n }\n t(!0);\n}\n\na();"
|
||||
],
|
||||
"version": 3
|
||||
}
|
||||
|
@ -6,5 +6,8 @@
|
||||
"sources": [
|
||||
"../../input/index.ts"
|
||||
],
|
||||
"sourcesContent": [
|
||||
"\n\nexport const foo = 1;"
|
||||
],
|
||||
"version": 3
|
||||
}
|
||||
|
@ -6,5 +6,8 @@
|
||||
"sources": [
|
||||
"../../input/index.js"
|
||||
],
|
||||
"sourcesContent": [
|
||||
"export const foo = () => {\n return 2;\n};"
|
||||
],
|
||||
"version": 3
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user