Hi? I set up the webpack development server, and I get an error like "Content not from webpack is served from /" I want to fix it!
Help!
-webapck.dev.config.js scripts : "webpack-dev": "webpack-dev-server --config webpack.dev.config.js --progress --mode development",
const path = require('path')
const webpack = require('webpack')
module.exports = {
entry: './src/index.js',
output: {
filename: 'bundle.js',
path: path.resolve(__dirname, 'dist'),
publicPath: "/"
},
devServer: {
port: 9000,
hot: true,
contentBase: './dist',
watchContentBase: true,
},
module: {
rules: [
{
test: /\.js$/,
use: [{
loader: 'babel-loader',
options: {
presets: [
[
'@babel/preset-env', {
targets: {node: 'current'}, // 노드일 경우만
modules: 'false'
}
],
],
},
}],
exclude: ['/node_modules', '/bower_components'],
},
],
},
plugins: [
new webpack.HotModuleReplacementPlugin()
],
optimization: {},
}