You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
42 lines
1.1 KiB
42 lines
1.1 KiB
8 years ago
|
const path = require("path");
|
||
|
const webpack = require("webpack");
|
||
|
const HtmlWebpackPlugin = require("html-webpack-plugin");
|
||
|
|
||
8 years ago
|
const rootDir = path.resolve(__dirname, "..", "..");
|
||
8 years ago
|
|
||
8 years ago
|
module.exports = {
|
||
8 years ago
|
entry: [
|
||
|
"core-js",
|
||
|
"./app/index.tsx"
|
||
|
],
|
||
8 years ago
|
output: {
|
||
8 years ago
|
path: path.resolve(rootDir, "public"),
|
||
8 years ago
|
filename: "bundle.js"
|
||
|
},
|
||
|
resolve: {
|
||
8 years ago
|
extensions: [".ts", ".tsx", ".js", ".json"],
|
||
8 years ago
|
alias: {
|
||
8 years ago
|
"@app": path.resolve(rootDir, "app"),
|
||
|
"@common": path.resolve(rootDir, "common"),
|
||
8 years ago
|
}
|
||
|
},
|
||
|
module: {
|
||
|
rules: [
|
||
8 years ago
|
{ test: /\.css$/, use: ["style-loader", "css-loader"] },
|
||
8 years ago
|
{ test: /\.(ttf|eot|svg|woff(2)?|png|jpg)(\?[a-z0-9=&.]+)?$/, use: "file-loader" },
|
||
|
{
|
||
|
test: /\.tsx?$/, use: {
|
||
|
loader: "awesome-typescript-loader",
|
||
8 years ago
|
options: { configFileName: path.resolve(rootDir, "app", "tsconfig.json") }
|
||
8 years ago
|
},
|
||
|
},
|
||
8 years ago
|
]
|
||
|
},
|
||
|
plugins: [
|
||
|
new HtmlWebpackPlugin({
|
||
|
template: "./app/index.html"
|
||
|
}),
|
||
|
new webpack.NamedModulesPlugin(),
|
||
|
],
|
||
|
};
|