webpack app/index.js dist/bundle.js 시 오류가 뜹니다.

20.02.03 11:49 작성 조회수 208

1

webpack app/index.js dist/bundle.js 시 오류가뜹니다.

계속 다시 해봐도 같은 증상이네요..4-

Built at: 2020-02-03 13:46:48
 1 asset
Entrypoint main = main.js
[1] multi ./app/index.js dist/bundle.js 40 bytes {0} [built]
[2] ./app/index.js 286 bytes {0} [built]
[3] (webpack)/buildin/global.js 472 bytes {0} [built]
[4] (webpack)/buildin/module.js 497 bytes {0} [built]
    + 1 hidden module

WARNING in configuration
The 'mode' option has not been set, webpack will fallback to 'production' for this value. Set 'mode' option to 'development' or 'production' to enable defaults for each environment.
You can also set it to 'none' to disable any default behavior. Learn more: https://webpack.js.org/configuration/mode/

ERROR in multi ./app/index.js dist/bundle.js
Module not found: Error: Can't resolve 'dist/bundle.js' in 'C:\Users\tmdgn\Desktop\BOBA\webpack\LearnWebpack-master\LearnWebpack-master\getting-started'
 @ multi ./app/index.js dist/bundle.js main[1]

답변 2

·

답변을 작성해보세요.

1

Kyuwon Lee님의 프로필

Kyuwon Lee

질문자

2020.02.03

mode는 설정했는데 밑에 에러는 뭘까요?

0

안녕하세요 규원님, 에러 로그를 보면 C:\Users\tmdgn\Desktop\BOBA\webpack\LearnWebpack-master\LearnWebpack-master\getting-started  위치에서 'dist/bundle.js' 를 해석할 수 없다고 나오네요. dist 폴더 밑의 bundle.js를 참조하는 코드를 한번 다시 살펴보시고. 만약 절대 경로로 되어 있다면 `./` 이런식으로 상대 경로 넣어주세요..!