Created
April 17, 2019 21:18
-
-
Save khayyamsaleem/a899826c9dfc0e61319a76ff2d720ab7 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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