@nxtensions/tsconfig-paths-snowpack-plugin
v0.0.1
Published
Snowpack plugin to use the tsconfig path mappings as aliases.
Maintainers
Readme
@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' },
],
],
};