Skip to content

Instantly share code, notes, and snippets.

@minmaxdata
Last active October 25, 2019 23:03
Show Gist options
  • Save minmaxdata/0ceb716547c268644152ccf41be1d0c2 to your computer and use it in GitHub Desktop.
Save minmaxdata/0ceb716547c268644152ccf41be1d0c2 to your computer and use it in GitHub Desktop.
my webpack
const path = require('path');
const SRC_DIR = path.join(__dirname, '/client/src');
const DIST_DIR = path.join(__dirname, '/client/dist');
module.exports = {
mode: 'none',
entry: `${SRC_DIR}/index.jsx`,
output: {
filename: 'bundle.js',
path: DIST_DIR,
},
module: {
rules: [
{
test: /\.jsx?/,
include: SRC_DIR,
use: ['babel-loader', 'eslint-loader'],
},
{
test: /\.css$/,
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