ream-typescript
TypeScript icon, indicating that this package has built-in type declarations

1.2.1 • Public • Published

ream-typescript

Typescript support for Ream.js.

Installation

Install Node packages:

npm i typescript ts-loader ream-typescript

Add plugin to ream.config.js:

module.exports = {
    plugins: [
        require('ream-typescript')(),
    ],
}

Usage

Your Ream app will now import *.ts files, and will support <script lang="ts"> section in *.vue files.

Development server will do background type checks with fork-ts-checker-webpack-plugin.

Plugin options

You may override plugin defaults by passing options objects:

module.exports = {
    plugins: [
        require('ream-typescript')({
            extensions: ['.ts', '.tsx'],
            ...
        }),
    ],
}

Available options:

  • extensions: ['.js', '.json', '.ts'].
  • serverTypeChecks: true — whether to run type checks in server webpack build.
  • clientTypeChecks: false — whether to run type checks in client webpack build (disabled by default as client and server builds typically run on the same set of files and this is mostly double work and duplicate errors output).
  • tsLoaderOptions — override ts-loader options.

Readme

Keywords

none

Package Sidebar

Install

npm i ream-typescript

Weekly Downloads

1

Version

1.2.1

License

MIT

Unpacked Size

4.62 kB

Total Files

5

Last publish

Collaborators

  • ilyasemenov