@ferrugemjs/loader
v3.0.6
Published
@ferrugemjs/loader is a simple webpack loader to converte template HTML engine to google incremental-DOM js
Downloads
9
Maintainers
Readme
ferrugemjs-loader
ferrugemjs-node is a simple webpack loader to converte template HTML engine to google incremental-DOM js.
Install
'npm install ferrugemjs-loader --save-dev'
Usage
//webpack.config.js
module: {
rules: [
{
test: /\.html$/
,loaders:[
{
loader: 'ferrugemjs-loader',
options: {
templateExtension:'.html', // default is '.html'
env: 'production' // default is 'development'
}
}
]
}
]
},
,resolve: {
extensions: [".js",".html"]
,alias:{
"app":__dirname + '/src'
,"ferrugemjs":"ferrugemjs/dist/core"
}
}
to work with webpack there is 'ferrugemjs/platform' as a application bootstrapping.
import bootstrapper from "ferrugemjs/bootstrapper";
or
import platform from "ferrugemjs/platform";
import init_app from "./init-app";
platform
.bootstrap(init_app)
.at(
document.getElementById("init_app_id")
);