historyApiFallback: true 옵션을 추가해줍니다.
module.exports = {
devServer: {
historyApiFallback: true,
contentBase: path.join(__dirname, 'dist'),
compress:true,
port:3000
}
};
worker_processes 1;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
sendfile on;
keepalive_timeout 65;
#gzip on;
server {
listen 80;
server_name localhost;
index index.html;
location / {
try_files $uri /index.html =404;
}
}
}