A set of webpack loaders to help with ember integration.
Check the example app here: https://github.com/tulios/ember-webpack-example
Check the rails 5.1 app using these loaders https://github.com/rajibahmed/ember-react-webpack-rails-demo
Use VERSION 0.2.0 if you're using webpack1 https://github.com/tulios/ember-webpack-loaders/tree/0.2.0
npm install ember-webpack-loaders
Apply this set of loaders to your webpack.config.js
:
{
module: {
rules: [
{
test: /\.hbs$/,
include: /app\/templates/, // or whatever directory you have
loader: 'ember-webpack-loaders/htmlbars-loader'
},
{
test: /app\/index\.js/, // the main app file
use: [
{
loader: 'ember-webpack-loaders/inject-templates-loader',
options: {
appPath: './path/to/app',
}
},
{
loader: 'ember-webpack-loaders/inject-modules-loader',
options: {
appPath: './path/to/app',
}
}
],
}
]
}
}
- appPath: Path for your ember app. Default assuming
webpack.config.js
in root folder and./app
- templateCompiler: default 'components-ember/ember-template-compiler.js'
- appPath: Path for your ember app. Default assuming
webpack.config.js
in root folder and./app
- 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: {
rules: [
{
test: /app\/index\.js/,
use: [
{
loader: 'ember-webpack-loaders/inject-templates-loader'
},
{
loader: 'ember-webpack-loaders/inject-modules-loader',
}
],
options: {
appVar: 'MyProject'
}
}
]
}
}
See LICENSE for more details.