Git Product home page Git Product logo

vscode-jumpaliaspath's Introduction

Vscode recognition webpack alias Jump

** to complete the degree is not high, not to recommend the use of **

alias identification webpack jump, but need to click on from reference section, import name is temporarily unavailable due in part to intercept vscode own events ( click on the name will prompt two locations) so temporarily shut down


only supports `` /@.**/ mode

support webpack configuration file alias field, other items not support


# ConfigurationConfiguration item

in settings.json

Mapping relationship`

fileAliasSetting.aliasMap` Set the mapping relationship, use ~~ relative path ~~ (temporarily use absolute path, later adaptation grouping and relative path), also Find webpack config file, but this will be configured as a master, the same name as overrides (temporarily) webpack config file

  • there is no good way to determine the root directory, the temporary use absolute paths *

** ** aliasMap packet identification has been completed

    // to Namespace top-level folder named key 
    "fileAliasSetting.aliasMap": { 
        "webpack": { 
            "@": "root/work/webpack/src" 
        }, 
        "default":{// default
            "@": "root/work/webpack/src" 
        }, 
    }, 

The file suffix

fileAliasSetting.fileSuffixs recognizes the file suffix (the following four are the default, if you can find others in settings.json (These four types do not need to be configured in setting.json)

"fileAliasSetting.fileSuffixs": [ 
    "js", 
    "ts", 
    "vue", 
    " 

jsx ", ],

indicates the webpack config file name

fileAliasSetting .configPos indicates webpack config file name, key name is project folder name, value is webpack config file name

    " fileAliasSetting.configPos ": { 
        " project root ":" webpack configuration item file name ", 
    }, 

** Do not use ./ or / **

    "fileAliasSetting.configPos" for keys whose configuration files are not under the root directory :{ 
        "webpack-project-name": "webpack.config.js",
        "vue-project-name": "build / webpack.config.dev.js" // Do not use relative or absolute symbols 
        "default": "webpack.config.js", // default webpack configuration file name, optional or not Fill in 
    }, 

Future plan

Plan name Priority Completion degree Remarks
Support webpack config High Complete Support webalia configuration file alias field
supports full [webpack alias] (https://webpack.docschina.org/configuration/resolve/#resolve-alias) high unfinished
the typescript of low unfinished
support points Project analysis Low 99% ~~ Need to identify the root directory ~~, the top folder of the workspace is called the root directory
Data persistence Low Unfinished

vscode-jumpaliaspath's People

Contributors

reddragonlh avatar tatosjb avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.