Add webpack-dev-server

This commit is contained in:
grafixeyehero 2019-09-30 23:51:46 +03:00
parent e7610b0e4a
commit 716ac36031
4 changed files with 45 additions and 18 deletions

23
webpack.common.js Normal file
View file

@ -0,0 +1,23 @@
const path = require('path');
module.exports = {
context: path.resolve(__dirname, 'src'),
entry: './bundle.js',
resolve: {
modules: [
path.resolve(__dirname, 'node_modules')
]
},
module: {
rules: [
{
test: /\.css$/i,
use: ['style-loader', 'css-loader']
},
{
test: /\.(png|jpg|gif)$/i,
use: ['file-loader']
}
]
},
};