neutrino-middleware-typescript-loader
v0.1.0
Published
Neutrino TypeScript loader middleware
Downloads
3
Maintainers
Readme
Neutrino TypeScript loader middleware
neutrino-middleware-typescript-loader
is a Neutrino middleware for compiling TypeScript files with awesome-typescript-loader
. It is compatible with .ts and .tsx files.
Requirements
- Node.js v6.9+
- Neutrino v5
Installation
neutrino-middleware-typescript-loader
can be installed from NPM.
❯ npm install --save neutrino-middleware-typescript-loader
Usage
neutrino-middleware-typescript-loader
can be consumed from the Neutrino API, middleware, or presets. Require this package and plug it into Neutrino:
const typeScriptLoader = require('neutrino-middleware-typescript-loader')
neutrino.use(typeScriptLoader, {
include: [],
exclude: []
})
include
- optional array of paths to include in the compilation. Maps to Webpack's Rule.includeexclude
- optional array of paths to exclude from the compilation. Maps to Webpack's Rule.include
It is recommended to call this middlware after neutrino.config.module.rule('compile')
initialization to avoid unexpected overriding. More imformation about usage of Neutrino middlwares can be found in the documentation.
Rules
This is a list of rules that are used by neutrino-middleware-typescript-loader
:
type
: Compiles TypeScript files to JavaScript modules. Contains a single loader namedtypescript
.compile
: Only necessary file extension added.