웹팩 데브 서버 버전 업그레이드에 따라 강좌 영상 1-1, 1-2, 1-5, 2-2가 업데이트 되었습니다.
import { Configuration as WebpackConfiguration } from "webpack";
import { Configuration as WebpackDevServerConfiguration } from "webpack-dev-server";
interface Configuration extends WebpackConfiguration {
devServer?: WebpackDevServerConfiguration;
}
...
devServer: {
devMiddleware: { publicPath: '/dist' },
static: { directory: path.resolve(__dirname) },
hot: true
}
4버전에서는 devServer 옵션이 위와 같이 바뀌었습니다. 깃헙 코드 참고하세요. 다른 버전들도 최신화해두었습니다!
https://github.com/zerocho/ts-react