웹땔감 깃붕이 며칠 전부터 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',
}),
],
};
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',
}),
],
};
검색하니까 바로 스오플 뜨는데 확인해봤음?
내가 찾았을 때는 스오플에서 angular 문제로 묻는거랑 umd-compat-loader 이거 있었는데 둘 다 해봤는데 안되더라
내가 못찾은 다른게 있나
애초에 노드에서 돌아가는걸 브라우저로 끌고 오려는게 잘못임 - dc App
서버에 구현해서 웹으로 붙여쓰거나 일렉트론으로 만들던가 해야할거임 tcp위에 직접 구현한걸텐데 그걸 브라우저에서 쓸수가 없음 - dc App
아하 지식 모자란 땔감 하나 배워갑니다... 이걸로 몇일을 헤멨는데 헛발질이였네
정말 고마워!!!