PWAplugin for TypeScript syntax support!
Installing this plugin allows your PWA toolchian to consume & understand TypeScript. This is done by:
@babel/preset-typescript.ts and .tsx extensions@pwa/plugin-prettier and @pwa/plugin-eslint traverse TypeScript (if installed)Important: Your PWA application is still compiled by Babel!
This allows you to continue leveraging the existing Babel ecosystem.
This plugin enables you to write in TypeScript and yield its type-checking.
$ npm install --save-dev @pwa/plugin-typescript typescript
None – recognized by and attached to @pwa/core automatically!
Configurable via the typescript key on your pwa.config.js file.
Your configuration is passsed to @babel/preset-typescript directly!
Note: Prettier options passed to
pwa.config.jsdirectly will override config files' values.
Default Config:
exports.typescript = {
allExtensions: true,
isTSX: true,
}
Available Options:
See the TypeScript Options for the Babel preset.