3.0.0 • Published 7 years ago

@motorcycle/loader v3.0.0

Weekly downloads
1
License
MIT
Repository
github
Last release
7 years ago

@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.

3.0.0

7 years ago

2.1.0

7 years ago

2.0.0

7 years ago

1.2.0

7 years ago

1.1.0

7 years ago

1.0.0

7 years ago