pathfinder/demo/client/webpack.config.js

55 lines
1.4 KiB
JavaScript
Raw Normal View History

const ExtractTextPlugin = require('extract-text-webpack-plugin');
2017-08-08 14:23:30 -04:00
module.exports = {
devtool: 'inline-source-map',
2017-08-25 23:20:45 -04:00
entry: {
'svg-demo': "./src/svg-demo.ts",
'text-demo': "./src/text-demo.ts",
2017-08-25 23:20:45 -04:00
},
2017-08-08 14:23:30 -04:00
module: {
rules: [
{
test: /\.tsx?$/,
use: 'ts-loader',
exclude: /node_modules/,
},
{
test: /html\/[a-zA-Z0-9_-]+\.html$/,
use: [
{
loader: 'file-loader',
options: {
name: "[name].html",
},
},
'extract-loader',
{
loader: 'html-loader',
options: {
interpolate: true,
},
},
],
},
{
test: /html\/include\/[a-zA-Z0-9_-]+\.html$/,
use: [
{
loader: 'html-loader',
options: {
interpolate: true,
},
},
],
},
2017-08-08 14:23:30 -04:00
]
},
resolve: {
extensions: [".tsx", ".ts", ".html", ".js"],
2017-08-08 14:23:30 -04:00
},
output: {
2017-08-25 23:20:45 -04:00
filename: "[name].js",
2017-08-08 14:23:30 -04:00
path: __dirname,
},
}