-
Notifications
You must be signed in to change notification settings - Fork 33.8k
Closed
Labels
javascriptJavaScript support issuesJavaScript support issuesupstream-issue-linkedThis is an upstream issue that has been reported upstreamThis is an upstream issue that has been reported upstream
Description
Backstory
My frontend code imports various templates via
import template from "templates/foo/bar/baz.jinja";
using Webpack to compile the templates.
To this end, I have this is my tsconfig.json:
{
"compilerOptions": {
"baseUrl": "client",
"paths": {
"templates/*": [
"../server/templates/*"
]
}
}
}
and this in global.d.ts
declare module "*.jinja" {
export default function(context?: { [arg: string]: any }): string;
}
With this setup I have type checking and when I start to import a template intellisense correctly gives me folders however it does not show me any of the .jinja
files in those folders.
It also does not let me jump to those files by pressing F12 in the way that it does with typescript files.
Request
- I want to be able to type
import template from "templates/foo/bar/
, press ctrl space and be shownbaz.jinja
- I would like to be able to press F12 on
import template from "templates/foo/bar/baz.jinja";
and be taken to/server/templates/foo/bar/baz.jinja
in the editor
Metadata
Metadata
Assignees
Labels
javascriptJavaScript support issuesJavaScript support issuesupstream-issue-linkedThis is an upstream issue that has been reported upstreamThis is an upstream issue that has been reported upstream