First commit to the new repository
:
This commit is contained in:
51
webpack.config.js
Executable file
51
webpack.config.js
Executable file
@@ -0,0 +1,51 @@
|
||||
const path = require("path");
|
||||
const webpack = require("webpack");
|
||||
|
||||
module.exports = {
|
||||
entry: "./src/index.tsx",
|
||||
mode: "development",
|
||||
module: {
|
||||
rules: [
|
||||
{
|
||||
test: /\.tsx?$/,
|
||||
exclude: /(node_modules|bower_components|\.d\.ts$)/,
|
||||
use: [
|
||||
{
|
||||
loader: "babel-loader",
|
||||
options: { presets: ["@babel/env"] },
|
||||
},
|
||||
{ loader: "ts-loader" },
|
||||
],
|
||||
},
|
||||
{
|
||||
test: /\.d\.ts$/,
|
||||
loader: 'ignore-loader'
|
||||
},
|
||||
{
|
||||
test: /\.css$/,
|
||||
use: ["style-loader", "css-loader"]
|
||||
},
|
||||
{
|
||||
test: /\.(png|jpe?g|gif|ttf|woff2?|eot|svg)$/i,
|
||||
use: [
|
||||
{
|
||||
loader: 'file-loader',
|
||||
},
|
||||
],
|
||||
}
|
||||
]
|
||||
},
|
||||
resolve: { extensions: [".tsx", ".ts", ".js", "*"] },
|
||||
output: {
|
||||
path: path.resolve(__dirname, "dist/"),
|
||||
publicPath: "/kadi/game/static/",
|
||||
filename: "bundle.js"
|
||||
},
|
||||
devServer: {
|
||||
contentBase: path.join(__dirname, "public/"),
|
||||
port: 3000,
|
||||
publicPath: "http://localhost:3000/dist/",
|
||||
hotOnly: true
|
||||
},
|
||||
plugins: [new webpack.HotModuleReplacementPlugin()]
|
||||
};
|
||||
Reference in New Issue
Block a user