0.1.6 • Published 2 years ago

tsconfig-paths-snowpack-plugin v0.1.6

Weekly downloads
19
License
MIT
Repository
github
Last release
2 years ago

tsconfig-paths-snowpack-plugin

npm package

Description

This is a simple plugin that will use the paths you have defined in your tsconfig.json in your snowpack configuration.

Disclaimer

I would recommend to use another pugin (see alternatives), since this is the first npm package that I have published. And I can't guarantee that it will work in every usecase.

Usage

snowpack.config.json

"plugins": [
  ["tsconfig-paths-snowpack-plugin", {/* See Options */}],
],

tsconfig.json

{
  "compilerOptions": {
    "baseUrl": "./",
    "paths": {
      "@app/*": ["src/*"]
    },
  }
}

will be converted at build time into:

snowpack.config.js

module.exports = {
  alias: {
    "@app": "src"
  }
}

Options

FieldTypeRequiredDescription
logAliasboolNoThis will print the modified alias of your snowpack configuration. Keep in mind that you have to set devOptions: { output: 'stream' } in your snowpack.config.js to prevent snowpack from clearing the console.

Contribution

If you have any ideas to improve the project, feel free to do so.

Alternatives

0.1.6

2 years ago

0.1.5

2 years ago

0.1.2

3 years ago

0.1.3

3 years ago

0.1.1

3 years ago

0.1.0

3 years ago