Skip to content

Commit cdecc1b

Browse files
authoredMar 28, 2022
Feat/svelte files (#4348)
* ✨ NEW: svelte files support * ✏️ UPDATE: release note * 🔥 REMOVE: wrong yarn.lock * ✨ NEW: svelte files support (enable load!)
1 parent b3d3ccd commit cdecc1b

File tree

3 files changed

+10
-2
lines changed

3 files changed

+10
-2
lines changed
 

‎.changeset/stale-nails-sort.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@graphql-tools/graphql-tag-pluck': patch
3+
---
4+
5+
adding svelte file support

‎packages/graphql-tag-pluck/src/config.ts

+3
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,9 @@ export default function generateConfig(
6767
case '.vue':
6868
plugins.push('typescript', 'vue');
6969
break;
70+
case '.svelte':
71+
plugins.push('typescript', 'svelte');
72+
break;
7073
default:
7174
plugins.push('jsx', ...dynamicFlowPlugins);
7275
break;

‎packages/loaders/code-file/src/index.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ export type CodeFileLoaderOptions = {
4545
} & CodeFileLoaderConfig &
4646
BaseLoaderOptions;
4747

48-
const FILE_EXTENSIONS = ['.ts', '.tsx', '.js', '.jsx', '.vue'];
48+
const FILE_EXTENSIONS = ['.ts', '.tsx', '.js', '.jsx', '.vue', '.svelte'];
4949

5050
function createGlobbyOptions(options: CodeFileLoaderOptions): GlobbyOptions {
5151
return { absolute: true, ...options, ignore: [] };
@@ -65,7 +65,7 @@ const buildIgnoreGlob = (path: string) => `!${path}`;
6565
* });
6666
* ```
6767
*
68-
* Supported extensions include: `.ts`, `.tsx`, `.js`, `.jsx`, `.vue`
68+
* Supported extensions include: `.ts`, `.tsx`, `.js`, `.jsx`, `.vue`, `.svelte`
6969
*/
7070
export class CodeFileLoader implements Loader<CodeFileLoaderOptions> {
7171
private config: CodeFileLoaderConfig;

0 commit comments

Comments
 (0)
Please sign in to comment.