Use Webpack
This commit is contained in:
27
webpack.config.ts
Normal file
27
webpack.config.ts
Normal file
@@ -0,0 +1,27 @@
|
||||
import path from "path";
|
||||
import webpack from "webpack"; // tslint:disable-line:no-implicit-dependencies
|
||||
|
||||
const config: webpack.Configuration = {
|
||||
devtool: "inline-source-map",
|
||||
entry: "./src/frontend/index.ts",
|
||||
mode: "development",
|
||||
module: {
|
||||
rules: [
|
||||
{
|
||||
exclude: /node_modules/,
|
||||
test: /\.tsx?$/,
|
||||
use: "ts-loader"
|
||||
}
|
||||
]
|
||||
},
|
||||
output: {
|
||||
filename: "[name].bundle.js",
|
||||
path: path.resolve(__dirname, "dist"),
|
||||
publicPath: "/assets/"
|
||||
},
|
||||
resolve: {
|
||||
extensions: [".tsx", ".ts", ".js"]
|
||||
}
|
||||
};
|
||||
|
||||
export default config;
|
||||
Reference in New Issue
Block a user