Skip to content

Instantly share code, notes, and snippets.

@Davisonpro
Created August 9, 2023 19:03
Show Gist options
  • Save Davisonpro/b93567cc235204396596d0d94efde968 to your computer and use it in GitHub Desktop.
Save Davisonpro/b93567cc235204396596d0d94efde968 to your computer and use it in GitHub Desktop.
const path = require('path');
module.exports = (env, argv) => {
return {
mode: argv.mode,
entry: './app/index.js',
output: {
filename: 'bundle.js',
path: path.resolve(__dirname, 'dist'),
},
module: {
rules: [
{
test: /\.(js|jsx)$/,
exclude: /node_modules/,
use: 'babel-loader',
},
{
test: /\.css$/, // Apply CSS loaders to .css files
use: ['style-loader', 'css-loader'],
},
],
},
resolve: {
extensions: ['.js', '.jsx'],
}
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment