@motorcycle/loader
TypeScript icon, indicating that this package has built-in type declarations

3.0.0 • Public • Published

@motorcycle/loader

This loader makes use of @motorcycle/compiler to make compile-time optimizations of Motorcycle constructs.

Install

yarn add --dev @motorcycle/loader
# or
npm install --save-dev @motorcycle/loader

Motorcycle Starter

This loader and other webpack optimizations are configured for you in our very own Motorcycle starter application, which can be found here.

Usage

To make use of this loader you only need to add @motorcycle/loader before ts-loader in your webpack configuration with some configuration.

// webpack.config.js
const entry = 'src/bootstrap.ts'

module.exports = {
  entry,
  module: {
    rules: [
      {
        test: /\.ts$/,
        use: [
          {
            loader: '@motorcycle/loader',
            options: {
              entries: [ entry ]
            }
          },
          'ts-loader'
        ],
        exclude: /node_modules/
      }
    ]
  },
  // other configuration options
}

Options

entries: Array<string>

Entries are paths, relative or absolute, to the part(s) of your application that have calls to run from @motorcycle/run.

Readme

Keywords

none

Package Sidebar

Install

npm i @motorcycle/loader

Weekly Downloads

0

Version

3.0.0

License

MIT

Last publish

Collaborators

  • tylors
  • motorcyclets
  • frikki