Huuums/vscode-folder-templates

Module not found

Opened this issue · 1 comments

When creating a React functional component and a SCSS file, an error appears as "module not found" for the SCSS file.

ezgif-3-7bbbae060b

My settings are the below

	"folderTemplates.structures": [
		{
			"name": "React Functional Component Template",
			"omitParentDirectory": true,
			"structure": [
				{
					"fileName": "<FTName | capitalize>.jsx",
					"template": "React Functional Component"
				},
				{
					"fileName": "<FTName | capitalize>.module.scss",
					"template": "SCSS Module"
				}
			]
		}
	],
	"folderTemplates.fileTemplates": {
		"React Functional Component": [
			"import styles from './<FTName | capitalize>.module.scss';",
			"",
			"const <FTName | capitalize> = () => {",
			"  return <div className={styles.container}><FTName | capitalize></div>;",
			"};",
			"",
			"export default <FTName | capitalize>"
		],
		"SCSS Module": [".container {", "", "}"]
	},

Hi @lagroms,

does the error persist for a created file after you reload VSCode? I'm not sure we're able to help here because the file is created as configured in the template.

The file seems to exist so I'm not sure why VSCode tells you it cannot find it.

Could you create a minimal repo that reproduces this error so we can take a look as to what might be happening?

Thanks