I am trying to create a theme for Ghost using React. I use webpack as my build tool. How can I tell webpack to serve a specific .hbs file? As it now seems, Webpack only supports .html files. Below is my dev config ... does webpack usually support anything that gets into it?
var path = require('path'); var webpack = require('webpack'); var HtmlWebpackPlugin = require('html-webpack-plugin'); module.exports = { entry: [ 'webpack-dev-server/client?http://localhost:2368', 'webpack/hot/only-dev-server', './src/router' ], devtool: 'eval', debug: true, output: { path: path.join(__dirname, 'public'), filename: 'bundle.js', //publicPath: '/static/' }, resolveLoader: { modulesDirectories: ['node_modules'] }, plugins: [ new webpack.HotModuleReplacementPlugin(), new webpack.NoErrorsPlugin(), new HtmlWebpackPlugin({ template: './public/default.hbs', //hash: true, inject: 'body', filename: 'default.hbs' }) ], resolve: { extensions: ['', '.js', '.sass', '.css', '.hbs'] }, module: { loaders: [ // js { test: /\.js$/, loaders: ['babel'], include: path.join(__dirname, 'src') }, // CSS { test: /\.sass$/, include: path.join(__dirname, 'src'), loader: 'style-loader!css-loader!sass-loader' }, // handlebars { test: /\.hbs$/, include: path.join(__dirname, 'public'), loader: 'handlebars-template-loader' } ] }, node: { fs: 'empty' } };
source share