1
0
mirror of https://github.com/byulmaru/quesdon synced 2024-11-30 15:58:01 +09:00
quesdon/webpack.config.js
2017-12-09 10:28:58 +09:00

37 lines
1.0 KiB
JavaScript

const webpack = require("webpack")
module.exports = {
entry: "./src/client/index.ts",
output: {
path: __dirname+"/dist/client",
filename: "bundle.js",
publicPath: "/assets/",
},
devServer: {
contentBase: "dist/client",
proxy: {
"/": "http://localhost:"+(process.env.BACK_PORT || 3000)
},
},
plugins: [
new webpack.ProvidePlugin({
riot: "riot",
"$": "jquery",
apiFetch: __dirname+"/src/client/api-fetch.ts"
})
],
module: {
loaders: [
{test: /\.css$/, loader: 'style-loader!css-loader'},
{test: /\.tag$/, exclude: /node_modules/, use: [
{loader: 'babel-loader'},
{loader: 'riot-tag-loader', query: {
type: "none",
template: "pug"
}}
]},
{test: /\.(woff2?|ttf|eot|svg)$/, loader: 'file-loader'},
{test: /\.ts$/, loader: 'ts-loader'},
]
}
}