33 lines
716 B
JavaScript
33 lines
716 B
JavaScript
const path = require('path');
|
|
const HtmlWebpackPlugin = require('html-webpack-plugin')
|
|
|
|
module.exports = {
|
|
mode: process.env.NODE_ENV || 'none',
|
|
module: {
|
|
rules: [
|
|
{
|
|
test: /\.css$/i,
|
|
use: ["style-loader", "css-loader"],
|
|
},
|
|
],
|
|
},
|
|
entry: './src/index.js',
|
|
output: {
|
|
filename: 'lib/bundle.js',
|
|
path: path.resolve(__dirname, 'dist'),
|
|
clean: true,
|
|
},
|
|
plugins: [
|
|
new HtmlWebpackPlugin({
|
|
title: '2048 Game',
|
|
})
|
|
],
|
|
devServer: {
|
|
static: {
|
|
directory: path.join(__dirname, 'dist'),
|
|
},
|
|
compress: true,
|
|
port: 8080,
|
|
},
|
|
};
|