ember-webpack-loaders
v0.2.0
Published
A set of webpack loaders to help with ember integration
Downloads
4
Readme
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
. DefaultApp
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.