Skip to content

Commit

Permalink
Feat/svelte files (#4348)
Browse files Browse the repository at this point in the history
* ✨ NEW: svelte files support

* ✏️ UPDATE: release note

* 🔥 REMOVE: wrong yarn.lock

* ✨ NEW: svelte files support (enable load!)
  • Loading branch information
jycouet committed Mar 28, 2022
1 parent b3d3ccd commit cdecc1b
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/stale-nails-sort.md
@@ -0,0 +1,5 @@
---
'@graphql-tools/graphql-tag-pluck': patch
---

adding svelte file support
3 changes: 3 additions & 0 deletions packages/graphql-tag-pluck/src/config.ts
Expand Up @@ -67,6 +67,9 @@ export default function generateConfig(
case '.vue':
plugins.push('typescript', 'vue');
break;
case '.svelte':
plugins.push('typescript', 'svelte');
break;
default:
plugins.push('jsx', ...dynamicFlowPlugins);
break;
Expand Down
4 changes: 2 additions & 2 deletions packages/loaders/code-file/src/index.ts
Expand Up @@ -45,7 +45,7 @@ export type CodeFileLoaderOptions = {
} & CodeFileLoaderConfig &
BaseLoaderOptions;

const FILE_EXTENSIONS = ['.ts', '.tsx', '.js', '.jsx', '.vue'];
const FILE_EXTENSIONS = ['.ts', '.tsx', '.js', '.jsx', '.vue', '.svelte'];

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

0 comments on commit cdecc1b

Please sign in to comment.