You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
(feat) support preserveValueImports introduced in TS 4.5 (#434)
* (feat) support preserveValueImports introduced in TS 4.5
This new flag keeps imports as is, essentially functioning the same as the import transformer.
* Update test/transformers/typescript.test.ts
Co-authored-by: Simon Holthausen <[email protected]>
Co-authored-by: Christian Kaisermann <[email protected]>
|`markupTagName`|`"template"`|`string` that sets the name of the tag `svelte-preprocess` looks for markup in custom languages.<br><br>i.e `markup` makes it possible to write your markup between `<markup lang="..."></markup>` tag.|
73
-
|`aliases`|`null`| A list of tuples `[alias: string, language: string]` that correlates an `alias` to a `language`<br><br>i.e `['cst', 'customLanguage']` means<br>`<... src="./file.cst">`<br>`<... lang="cst">`<br>are treated as `customLanguage`.|
74
-
|`preserve`|`[]`| A `string` list of languages/aliases that shouldn't pass through the preprocessor. (i.e `ld+json`)|
75
-
|`sourceMap`|`false`| If `true`, `svelte-preprocess` generates sourcemap for every language that supports it.|
|`markupTagName`|`"template"`|`string` that sets the name of the tag `svelte-preprocess` looks for markup in custom languages.<br><br>i.e `markup` makes it possible to write your markup between `<markup lang="..."></markup>` tag. |
73
+
|`aliases`|`null`| A list of tuples `[alias: string, language: string]` that correlates an `alias` to a `language`<br><br>i.e `['cst', 'customLanguage']` means<br>`<... src="./file.cst">`<br>`<... lang="cst">`<br>are treated as `customLanguage`. |
74
+
|`preserve`|`[]`| A `string` list of languages/aliases that shouldn't pass through the preprocessor. (i.e `ld+json`) |
75
+
|`sourceMap`|`false`| If `true`, `svelte-preprocess` generates sourcemap for every language that supports it. |
76
76
77
77
##### Configuring preprocessors
78
78
@@ -368,12 +368,12 @@ Note: `svelte-preprocess` automatically configures inclusion paths for your root
|`tsconfigDirectory`|`undefined`| optional `string` that specifies from where to load the tsconfig from.<br><br>i.e `'./configs'`|
374
-
|`tsconfigFile`|`undefined`| optional `string` pointing torwards a `tsconfig` file.<br><br>i.e `'./tsconfig.app.json'`|
375
-
|`compilerOptions`|`undefined`| optional compiler options configuration. These will be merged with options from the tsconfig file if found. |
376
-
|`handleMixedImports`| inferred | optional `boolean` that defines the transpilation strategy. If set to `true`, you don't need to strictly separate types and values in imports. You need at least Svelte version 3.39 if you want to use this. `true` by default if you meet the minimum version requirement, else `false`. |
|`tsconfigDirectory`|`undefined`| optional `string` that specifies from where to load the tsconfig from.<br><br>i.e `'./configs'`|
374
+
|`tsconfigFile`|`undefined`| optional `string` pointing torwards a `tsconfig` file.<br><br>i.e `'./tsconfig.app.json'`|
375
+
|`compilerOptions`|`undefined`| optional compiler options configuration. These will be merged with options from the tsconfig file if found. |
376
+
|`handleMixedImports`| inferred | optional `boolean` that defines the transpilation strategy. If set to `true`, you don't need to strictly separate types and values in imports. You need at least Svelte version 3.39 if you want to use this. `true` by default if you meet the minimum version requirement, else `false`. This option will be ignored if you set `preserveValueImports` to `true` in your `tsconfig.json`. |
377
377
378
378
You can check the [`compilerOptions` reference](https://www.typescriptlang.org/docs/handbook/tsconfig-json.html) for specific TypeScript options.
0 commit comments