@nxtensions/tsconfig-paths-snowpack-plugin
TypeScript icon, indicating that this package has built-in type declarations

0.0.1 • Public • Published

@nxtensions/tsconfig-paths-snowpack-plugin

Snowpack plugin adding support for using path mappings specified in tsconfig files. This is useful for projects that use Typescript and want to reuse the defined path mappings in the tsconfig as aliases in Snowpack.

How to use

Add the plugin to your Snowpack configuration:

// snowpack.config.mjs

/** @type {import("snowpack").SnowpackUserConfig } */
export default {
  plugins: ['@nxtensions/tsconfig-paths-snowpack-plugin'],
};

By default the plugin will try to locate a tsconfig.json file relative to the Snowpack root. A custom configuration file path can be specified by specifying the tsConfig option:

// snowpack.config.mjs

/** @type {import("snowpack").SnowpackUserConfig } */
export default {
  plugins: [
    [
      '@nxtensions/tsconfig-paths-snowpack-plugin',
      { tsConfig: 'tsconfig.app.json' },
    ],
  ],
};

Package Sidebar

Install

npm i @nxtensions/tsconfig-paths-snowpack-plugin

Weekly Downloads

1

Version

0.0.1

License

MIT

Unpacked Size

5.92 kB

Total Files

6

Last publish

Collaborators

  • leosvelperez