ember-webpack-loaders

0.2.0 • Public • Published

Ember Webpack Loaders

A set of webpack loaders to help with ember integration.

Check the example app here: https://github.com/tulios/ember-webpack-example

Install

npm install ember-webpack-loaders

Usage

Apply this set of loaders to your webpack.config.js:

{
  module: {
    loaders: [
      {
        test: /\.hbs$/,
        include: /app\/templates/, // or whatever directory you have
        loader: 'ember-webpack-loaders/htmlbars-loader'
      },
      {
        test: /app\/index\.js/, // the main app file
        loader: 'ember-webpack-loaders/inject-templates-loader!ember-webpack-loaders/inject-modules-loader'
      }
    ]
  }
}

Options

for ember-webpack-loaders/htmlbars-loader

  • appPath: Path for your ember app. Default assuming webpack.config.js in root folder and ./app
  • templateCompiler: default 'components-ember/ember-template-compiler.js'

for ember-webpack-loaders/inject-templates-loader

  • appPath: Path for your ember app. Default assuming webpack.config.js in root folder and ./app

for ember-webpack-loaders/inject-modules-loader

  • appPath: Path for your ember app. Default assuming webpack.config.js in root folder and ./app
  • appVar: Variable name of your Ember.Application. Default App

Example:

{
  module: {
    loaders: [
      {
        test: /app\/index\.js/,
        loader: 'ember-webpack-loaders/inject-templates-loader!ember-webpack-loaders/inject-modules-loader',
        query: {
          appVar: 'MyProject'
        }
      }
    ]
  }
}

License

See LICENSE for more details.

Readme

Keywords

none

Package Sidebar

Install

npm i ember-webpack-loaders

Weekly Downloads

3

Version

0.2.0

License

MIT

Last publish

Collaborators

  • tulios