Skip to content

Instantly share code, notes, and snippets.

@eoguvo
Created May 20, 2021 20:37
Show Gist options
  • Save eoguvo/7dd99e25deeee368b5ddeff3fadb9b6b to your computer and use it in GitHub Desktop.
Save eoguvo/7dd99e25deeee368b5ddeff3fadb9b6b to your computer and use it in GitHub Desktop.
const path = require('path');
module.exports = {
mode: 'production',
entry: path.resolve(__dirname, 'src', 'main.js'),
output: {
path: path.resolve(__dirname, 'public', 'assets', 'js'),
filename: 'bundle.js'
},
module: {
rules: [{
exclude: /node_modules/,
test: /\.js$/,
use: {
loader: 'babel-loader',
options: {
presets: ['@babel/env']
}
}
}, {
test: /\.css$/,
use: ['style-loader', 'css-loader']
}]
},
devtool: 'source-map'
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment