ream-typescript

Typescript support for Ream.js


License
MIT
Install
npm install ream-typescript@1.2.1

Documentation

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.