-
카테고리
-
세부 분야
프론트엔드
-
해결 여부
미해결
build 할 경우 dist 경로가 중첩됩니다.
20.11.22 21:44 작성 조회수 180
0
현재 엔트리와 아웃풋 강의를 보고 있는데요.
dist를 하면 dist/main.js 로 파일이 나오지 않고,
dist/main.js/main.js 로 나오고 있습니다.
작성한 webpack.config.js 파일은 이렇게 셋팅이 되어있구요.
const path = require('path');
module.exports = {
mode: 'development',
entry: {
main: "./src/app.js"
},
output: {
filename: "[name].js",
path: path.resolve("./dist")
}
}
package.json파일은 아래와 같이 작성 하였습니다.
{
"main": "index.js",
"dependencies": {
"webpack": "^5.6.0"
},
"devDependencies": {
"webpack-cli": "^4.2.0"
},
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"build": "webpack"
},
}
터미널에서는 아래와 같은 에러가 나옵니다!
[webpack-cli] [Error: EISDIR: illegal operation on a directory, open /Users/Desktop/project/dist/main.js] {
errno: -21,
code: 'EISDIR',
syscall: 'open',
path: '/Users/Desktop/project/dist/main.js'
}
답변을 작성해보세요.
0
답변 1