tskredens/webpack.config.ts

36 lines
726 B
TypeScript
Raw Normal View History

2019-10-06 21:49:54 +02:00
import path from "path";
import webpack from "webpack";
2019-10-06 21:49:54 +02:00
const config: webpack.Configuration = {
mode: "development",
entry: "./src/frontend/index.tsx",
devtool: "inline-source-map",
output: {
filename: "[name].bundle.js",
path: path.resolve(__dirname, "dist"),
publicPath: "/assets/",
},
2019-10-06 21:49:54 +02:00
module: {
rules: [
{
exclude: /node_modules/,
2019-10-06 23:53:59 +02:00
loader: "ts-loader",
test: /\.tsx?$/,
},
],
2019-10-06 21:49:54 +02:00
},
resolve: {
extensions: [".ts", ".tsx", ".js"],
alias: {
"@kredens": path.resolve(__dirname, "src/"),
},
2019-10-27 13:41:16 +01:00
},
plugins: [
new webpack.DefinePlugin({
API_URL: JSON.stringify("http://localhost:3000/api/"),
}),
],
2019-10-06 21:49:54 +02:00
};
export default config;