0.5.0 • Published 6 years ago
@pwa/plugin-typescript v0.5.0
@pwa/plugin-typescript
PWAplugin for TypeScript syntax support!
Installing this plugin allows your PWA toolchian to consume & understand TypeScript. This is done by:
- attaching
@babel/preset-typescript - altering webpack so that it recognizes the
.tsand.tsxextensions - altering
@pwa/plugin-prettierand@pwa/plugin-eslinttraverse TypeScript (if installed) - running TypeScript type checks in a separate process
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.
Install
$ npm install --save-dev @pwa/plugin-typescript typescriptUsage
None – recognized by and attached to @pwa/core automatically!
Config
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.
0.5.0
6 years ago