Implemented a snake game with redux
This commit is contained in:
32
webpack.config.js
Normal file
32
webpack.config.js
Normal file
@@ -0,0 +1,32 @@
|
||||
const webpack = require("webpack");
|
||||
const path = require("path");
|
||||
|
||||
module.exports = {
|
||||
target: "web",
|
||||
mode: "development",
|
||||
entry: path.resolve(__dirname, "src/index.js"),
|
||||
output: { path: path.resolve(__dirname, "public") },
|
||||
devtool: "inline-source-map",
|
||||
devServer: {
|
||||
contentBase: path.join(__dirname, "public"),
|
||||
// public: "http://localhost:9000/redux",
|
||||
// publicPath: "/redux/",
|
||||
hot: true,
|
||||
host: "0.0.0.0",
|
||||
compress: true,
|
||||
port: 9000,
|
||||
historyApiFallback: true
|
||||
},
|
||||
plugins: [new webpack.HotModuleReplacementPlugin()],
|
||||
module: {
|
||||
rules: [
|
||||
{
|
||||
test: /\.(js|jsx)$/,
|
||||
exclude: /node_modules/,
|
||||
use: {
|
||||
loader: "babel-loader"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user