const path = require('path') module.exports = { entry: './src/index.js', output: { path: path.resolve(__dirname, 'public/scripts'), filename: 'bundle.js' }, module: { rules: [{ test: /\.js$/, exclude: /node_modules/, loader: 'babel-loader', }] }, devServer: { contentBase: path.resolve(__dirname, 'public'), publicPath: '/scripts/' } } 調査の動機 開発したいアプリの要件にJavaScriptがあり、webpackでのバンドルが開発のモダンとのことなので、学習中。