如果有写 CoffeeScript 的同学我想推荐这个, 模仿 React 风格, 简单粗暴:
https://github.com/teambition/coffee-webpack-starter/blob/master/template.coffee
module.exports = (data) ->
stir.render stir.doctype(),
html null,
head null,
title null, "Coffee Webpack Starter"
meta charset: 'utf-8'
link
rel: 'icon'
href: 'http://tp4.sinaimg.cn/5592259015/180/5725970590/1'
link
rel: 'stylesheet'
href: if data.dev then 'src/main.css' else data.style
script src: data.vendor, defer: true
script src: data.main, defer: true
body null,
div class: 'intro',
div class: 'title', "This is a demo of Webpack usage."
line "Open Console to see how it loads."
div null,
span null, "Read more at "
a href: 'http://github.com/teambition/coffee-webpack-starter',
'github.com/teambition/coffee-webpack-starter'
span null, '.'
div class: 'demo',
React.renderToString Page()