webpack.config.js
659 Bytes
const path = require("path");
const HtmlWebpackPlugin = require('html-webpack-plugin');
module.exports = {
entry: ["./src/main.js"],
output: {
path: path.resolve(__dirname, "dist"),
filename: "js/[name].js"
},
module: {
rules: [
{
test: /\.js$/,
exclude: /node_modules/,
use: {
loader: "babel-loader"
}
},
{
test: /\.rt$/,
exclude: /node_modules/,
use: {
loader: "react-templates-loader?modules=amd"
}
},
]
},
plugins: [
new HtmlWebpackPlugin({
template: 'src/index.html'
})
],
devtool: 'sourcemap',
}