Giter Site home page Giter Site logo

unrealists / parcel-plugin-typescript-paths Goto Github PK

View Code? Open in Web Editor NEW

This project forked from boboben1/parcel-plugin-typescript-paths

0.0 1.0 0.0 327 KB

This plugin enabled Parcel to automatically use module aliases defined in tsconfig.json's compilerOptions.paths without any additional configuration.

License: MIT License

TypeScript 80.93% JavaScript 19.07%

parcel-plugin-typescript-paths's Introduction

parcel-plugin-typescript-paths

This plugin enabled parcel to be aware of typescript module paths (module aliasing).

pipeline status CodeFactor

Installation

npm install --save-dev parcel-plugin-typescript-paths

WARNING

This project is in heavy development and will change. Please don't use on production.

Feel free to contribute.

Known Limitations

This plugin uses regular expressions to perform a search and replace in your code. To avoid collisions, it is recommended to only use unique names as your paths. For example, if you have the following in your tsconfig:

"paths": {
    "upload": ["src/upload"],
}

and you have the following content string in your code:

Students, import your work for review 
by clicking the button "upload".

then "upload" will get replaced with "src/upload".

The following would be a better configuration since "@upload" is probably less likely to be used as a content string in your app:

"paths": {
    "@upload": ["src/upload"],
}

parcel-plugin-typescript-paths's People

Contributors

boboben1 avatar jpray avatar code-factor avatar

Watchers

James Cloos 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.