Mi webpack es el siguiente
const path = require('path');
module.exports = {
entry: '../assets/javascript/entry.js',
output: {
publicPath: '/',
path: path.join(__dirname, '..'),
filename: 'dist/javascript/bundle.js'
},
devServer: {
port: 8080,
contentBase: path.join(__dirname, '..'),
hot: true
},
plugins: [],
module: {},
}
mi npm config es el siguiente
{
"name": "stories",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"start": "webpack serve"
},
"author": "",
"license": "ISC",
"devDependencies": {
"webpack": "^5.14.0",
"webpack-cli": "^4.3.1",
"webpack-dev-server": "^3.11.2"
}
}
pero cuando ejecuto doy run start me da el siguiente error
ERROR in main
Module not found: Error: Can't resolve
./assets/javascript/entry.js' in 'C:\Users\Abajo\Desktop\stories'
tambien me coloca este tipo de error 字段“浏览器”不包含有效的别名配置 使用描述文件:C:\Users\Abajo\package.json(相对路径:./Desktop/assets/javascript/entry.js) 没有延期 字段“浏览器”不包含有效的别名配置 C:\Users\Abajo\Desktop\assets\javascript\entry.js 不存在 .js