다음 프로젝트 튜토리얼(글 작성 후 링크 필요) 진행 중 다음과 같은 오류 발생
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
|
| const Home = () => {
> return <div>React Application</div>
| }
|
import * as path from 'path';
import { fileURLToPath } from 'url';
const __dirname = path.dirname(fileURLToPath(import.meta.url));
export default {
module: {
rules: [
{
//test: /\.(js)$/,
test: /\.(js|jsx)$/,
exclude: /node_modules/,
use: ['babel-loader']
}
]
},
resolve: {
extensions: ['*', '.js', '.jsx'],
},
output: {
filename: 'bundle.js',
},
devServer: {
static: './src'
},
};