Skip to content

Update service.ts to fix the errors with imports #8

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 21, 2020
Merged

Update service.ts to fix the errors with imports #8

merged 1 commit into from
Mar 21, 2020

Conversation

fatmirsukaliq
Copy link
Contributor

This resolves the following problems that we've encountered.

Problem 1
When using paths in tsconfig.json, e.g

"paths": {
      "@Components/*": ["components/*"]
 }

and then attempting to import a file in Svelte, e.g

import CoolComponent from '@Components/CoolComponent.svelte'

you receive a 2307 ("Cannot find module") error.

Problem 2
When using this type on tsconfig.json

And then trying to import something like e.g

import Editor from '/.Editor.svelte'

@orta
Copy link
Contributor

orta commented Mar 21, 2020

Looks good - thanks!

@orta orta merged commit f8cdb54 into sveltejs:master Mar 21, 2020
@jasonlyu123 jasonlyu123 mentioned this pull request Mar 23, 2020
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants