• 카테고리

    질문 & 답변
  • 세부 분야

    프론트엔드

  • 해결 여부

    미해결

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

21.08.21 08:07 작성 조회수 4.7k

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? }

답변 2

·

답변을 작성해보세요.

0

neostgeart님의 프로필

neostgeart

질문자

2021.08.21

와 감사합니다ㅠ

0

ChangKeun Ji님의 프로필

ChangKeun Ji

2021.08.21

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