웹땔감 깃붕이 며칠 전부터 node-kakao 써서 만들어 보려고 삽질중인데

webpack에서 자꾸 Critical dependency: require function is used in a way in which dependencies cannot be statically extracted 이거 뜨는데 어떡하냐

그냥 씹고 실행시키면 ./api 못찾는다고 지랄함

태생이 웹땔감이라 그런지 로그 보고 찾아봤는데도 안먹힌다

미천한 땔감에게 도움좀 주세요 ㅠㅠ

module.exports = {
mode: prod ? 'production' : 'development',
devtool: prod ? 'hidden-source-map' : 'eval',

entry: './src/index.tsx',

resolve: {
extensions: ['.js', '.jsx', '.ts', '.tsx'],
},
devServer: {
historyApiFallback: true,
port: 3000,
hot: true,
static: {
directory: '/'
}
},

module: {
rules: [
{
test: /\.tsx?$/,
use: ['babel-loader', 'ts-loader'],
},
],
},

output: {
path: path.join(__dirname, '/dist'),
filename: 'bundle.js',
},
plugins: [
new webpack.ProvidePlugin({
React: 'react',
}),
new webpack.HotModuleReplacementPlugin(),
new HtmlWebpackPlugin({
template: './static/index.html',
}),
],
};