enyancc / vscode-ext-node-module-resolve Goto Github PK
View Code? Open in Web Editor NEWNode modules resolve plugin for VSCode
Node modules resolve plugin for VSCode
Hey there,
This extension appears to always open the new file in the same tab, instead of opening the file in a new tab. Maybe if the user held shift it would open the file in a new tab?
Thanks!
I was looking at your code and noticed you return a promise https://github.com/sergiirocks/vscode-ext-node-module-resolve/blob/master/src/lib/module-extractor.js#L23 even thoough the whole logic is synchronous.
Maybe it would be worth making it synchronous and using Promise.resolve(value)
wherever you're using it?
Please, can you add "onLanguage:javascriptreact" to your awesome package?
Thank you.
Regards.
This seems to have broken after upgrading to vsc 1.5.
Hi,
This extension is very help until I found this little inconvenience.
I have a directory structure like this.
app/
src/
A.jsx
B.less
in A.jsx:
import './B.less';
when I wanted to import style from file B.less into A.jsx, but it does not work.And I notice this is related to function filterEs6 in src/lib/definition-provider.js. Maybe in there can be a bypass for *.less, *.css. Looking forward to your reply.
It appears that this extension is now broken, and unmaintained (last change occured 2 years ago, at the time of writing this).
Consider this basic CommonJS (require()
) syntax for importing the Express web framework:
var express = require('express');
var app = express();
app.set('port', process.env.PORT || 3000);
With the cursor on the last line's set
symbol, calling the Go to definition (F12) VSCode function, gives the error No definition found for 'set'
.
Instead, it should resolve the node_modules
directory hierarchy (located in the same directory as the file with above snippet).
Specifically it should resolve the /node_modules/express/lib/application.js
file, on the line:
app.set = function set(setting, val) {
Mind you I have disabled the TSServer with:
"typescript.disableAutomaticTypeAcquisition": true
in order to disable the default behaviour which sends theg user to the index.d.ts
file upon Go to definition.
Still confused? Click "Get Started" above.
I couldn't figure out how to set a custom NODE_PATH variable
Hi,
This extension worked for me just fine. Until now. Let's say I have a directory structure like this.
app/
src/
module-1/
A.js
module-2/
shared/
B.js
I used to import using relative path. So, when I wanted to import someExportedItem
from file B.js
into A.js
, I wrote import like this...
import {someExportedItem} from '../shared/B'
...and I was able to navigate to file B.js
by Ctrl+Click on someExportedItem
.
Today, I added root
option into my webpack config, so I can use import path relative to src
root: [
path.resolve('./src')
]
...and now it doesn't work anymore. Only navigation through Ctrl+Click on B
in the path string works.
Not a big deal of course, but I think this should be configurable somehow via settings.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.