Answer the question
In order to leave comments, you need to log in
Why doesn't webPack server work after reboot?
Installed webPack used it for three days, then rebooted the computer, webpack does not work.
After yarn start, the following is displayed in the console:
webpack-dev-server
ï½¢wdsï½£: Project is running at http://localhost:8000/
ï½¢wdsï½£: webpack output is served from /
ï½¢wdsï½£: Content not from webpack is served from ./dist
const path = require('path');
const VueLoaderPlugin = require('vue-loader/lib/plugin');
module.exports = {
mode: 'development',
devtool: 'source-map',
entry: path.join(__dirname, 'src', 'main', 'resources', 'static', 'js', 'main.js'),
devServer: {
contentBase: './dist',
compress: true,
port: 8000,
allowedHosts: [
'localhost:8080'
]
},
module: {
rules: [
{
test: /\.js$/,
exclude: /(node_modules|bower_components)/,
use: {
loader: 'babel-loader',
options: {
presets: ['@babel/preset-env']
}
}
},
{
test: /\.vue$/,
loader: 'vue-loader'
}
]
},
plugins: [
new VueLoaderPlugin()
],
resolve: {
modules: [
path.join(__dirname, 'src', 'main', 'resources', 'static', 'js'),
path.join(__dirname, 'node_modules'),
],
}
}
{
"dependencies": {
"vue": "^2.6.10",
"vue-resource": "^1.5.1"
},
"devDependencies": {
"@babel/core": "^7.6.0",
"@babel/preset-env": "^7.6.0",
"babel": "^6.23.0",
"babel-loader": "^8.0.6",
"vue-loader": "^15.7.1",
"vue-template-compiler": "^2.6.10",
"webpack": "^4.40.2",
"webpack-cli": "^3.3.8",
"webpack-dev-server": "^3.8.0",
"wepack-cli": "^0.0.1-security"
},
"name": "ui",
"version": "1.0.0",
"main": "index.js",
"license": "MIT",
"scripts": {
"start": "webpack-dev-server"
}
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question