'My webpack compiled successfully but server not found
i'm setting up a React Webpack from scratch, webpack-dev-server is running normally, but the page is not load. I don't know which part is wrong. Please help if you know how to fix it. appreciate.
error: Failed to load resource: the server responded with a status of 404 (Not Found) Please help.
"scripts": {
"serve": "webpack serve --mode development"
},
const path = require('path');
module.exports = {
output: {
path: path.join(__dirname, '/dist'),
filename:'index.bundle.js',
},
devServer: {
port:3010,
static: true,
},
module: {
rules: [
{
test:/\.(js|jsx)$/,
exclude:/node_modules/,
use: {
loader: 'babel-loader'
}
},
{
test: /\.scss$/,
use:[
'style-loader',
'css-loader',
'sass-loader'
]
}
]
}
}
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
