mt-loader
v1.0.4
Published
marionttee webpack loader
Downloads
5
Maintainers
Readme
marionette-loader
backbone.mariontte Webpack 组件加载器
It allows you to write your components in this format:
// app.mt
<template>
<div class='a' > <%- msg %></div>
</template>
<script>
import Page from '../page'
export default class extends Page {
initialize(options) {
this.model=new Backbone.Model({msg:'hello world'});
}
onRender(){
}
}
</script>
<style lang='sass'>
.a{
color:red;
}
</style>
Basic Usage
Config Webpack:
// webpack.config.js
module.exports = {
entry: './main.js',
output: {
filename: 'build.js'
},
module: {
loaders: [
{
test: /\.mt$/,
loader: 'mt-loader'
},
]
}
}