강의

멘토링

로드맵

Inflearn Community Q&A

neostgeart2035's profile image
neostgeart2035

asked

Learning React while making web games

2-9. Webpack Dev Server and Hot Reloading

webpack.config.js에서 devServer 프로퍼티 질문이 있습니다.

Written on

·

5K

1

output: {
path: path.join(__dirname, "dist"),
filename: "app.js",
publicPath: "/dist/",
},

devServer: {
publicPath: "/dist/",
hot: true,
},

이렇게 하고 패키지도 전부 정상적으로 설치했는데 자꾸 다음과 같은 에러가 뜹니다 혹시 무엇이 문제일가요?ㅠㅠ

[webpack-cli] Invalid options object. Dev Server has been initialized using an options object that does not match the API schema.

 - options has an unknown property 'publicPath'. These properties are valid:

   object { allowedHosts?, bonjour?, client?, compress?, devMiddleware?, headers?, historyApiFallback?, host?, hot?, http2?, https?, ipc?, liveReload?, onAfterSetupMiddleware?, onBeforeSetupMiddleware?, onListening?, open?, port?, proxy?, setupExitSignals?, static?, watchFiles?, webSocketServer? }

react

Quiz

57% of people got it wrong. Give it a try!

React에서 Class Component 대신 Functional Component와 함께 Hooks를 사용하는 주된 이유는 무엇일까요?

Class Component의 문법이 너무 복잡해서

상태 관리(`setState`)와 Ref 사용을 함수형 컴포넌트에서도 가능하게 하려고

Class Component보다 무조건 성능이 좋아서

React Router와 더 잘 통합되어서

Answer 2

1

publicPath 지우시면 됩니다. publicPath 속성은 이제 사용되지 않는것으로 보입니다.

0

neostgeart님의 프로필 이미지
neostgeart
Questioner

와 감사합니다ㅠ

neostgeart2035's profile image
neostgeart2035

asked

Ask a question