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