Require Module Support READMEFeaturesProvides goto definition functionality for require js modules. You can navigate to the source file from locations marked with the caret (^);
SettingsYou can set module path relative to workspace root with
without leading and trailing slashes. Example;
This will translate to It will default to workspace root path if not given. You can also use relative paths on require/define calls. Another option is;
When set to true, it will prevent the final search in the landing module and instead just reference the file. When this feature is left as false, the constructor or property that the goto definition operation has started with will be searched in the module file. If you use a dedicated RequireJS configuration file, which specified paths to sub-components or plugins, you can load it to help the module path resolution:
The value of Example:
This will evaluate the file If you use RequireJS plugins in your projects, which do not require appending file extensions to their target modules, you will need to supply these extensions too:
Example:
This will ensure, that a module reference like "css!views/panel" will be handled as "css!views/panel.css" before resolving the actual module path. If you for some reason are using custom
And this will resolve correctly. RequireJS Config FilesRequireJS configuration properties like Example:
JSX supportYou can use the completion system with JSX files as well. You just need to set
You can change object keys as you see fit. Installationrun;
in your command line, assuming vscode is installed and registered in your path. Or run;
in command+P menu of vscode. SupportThe project is maintained at: gitHub If this extension helped you, consider supporting its development at; |