2017-08-29 19:04:40 -04:00
|
|
|
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: {
|
2017-08-29 21:57:43 -04:00
|
|
|
'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/,
|
2017-08-29 19:04:40 -04:00
|
|
|
},
|
|
|
|
{
|
|
|
|
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: {
|
2017-08-29 19:04:40 -04:00
|
|
|
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,
|
|
|
|
},
|
|
|
|
}
|