README.md
creaton-loader
Loader for single-file Creaton components in Webpack
Install
npm i creaton-loader -D
webpack.config.js
module: {
rules: [
{
test: /\.html?$/,
loader: 'creaton-loader'
}
... // other rules
]
},
example Component.htm
<h2>${ this.title }</h2>
<p>${ this.message }</p>
<script>
import { httpRequest } from '../helpers'
exports = class WHome {
static mode = 'open'
static async startConnect() {
const home = await httpRequest('/db?page=home')
this.title = home.title
this.message = home.message
}
}
</script>
Описание
Loader for single-file Creaton components in Webpack
Конвейеры
0 успешных
0 с ошибкой