Skip to content

Instantly share code, notes, and snippets.

@khayyamsaleem
Created April 17, 2019 21:18
Show Gist options
  • Save khayyamsaleem/a899826c9dfc0e61319a76ff2d720ab7 to your computer and use it in GitHub Desktop.
Save khayyamsaleem/a899826c9dfc0e61319a76ff2d720ab7 to your computer and use it in GitHub Desktop.
const path = require('path');
module.exports = {
entry: {
app: './src/index.js',
},
devtool: 'inline-source-map',
output: {
path: path.resolve(__dirname, './dist'),
filename: 'index.js',
publicPath: '/',
},
module: {
rules: [
{
test: /^(?!.*?\.module).*\.css$/,
use: ['style-loader', 'css-loader'],
},
{
test: /\.module\.css$/,
use: [
'style-loader',
{
loader: 'css-loader',
options: {
modules: true,
localIdentName: "[name]_[local]_[hash:base64]",
sourceMap: true,
},
},
],
},
{
test: /\.js$/,
exclude: /node_modules/,
use: {
loader: 'babel-loader',
},
},
],
},
plugins: [
],
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment