Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const path = require('path')
- const ExtractTextPlugin = require('extract-text-webpack-plugin')
- const webpackConfig = {
- devtool: 'source-map',
- entry: './src/index.js',
- output: {
- path: path.resolve(__dirname, './build'),
- filename: 'index.bundle.js'
- },
- module: {
- rules: [
- {
- test: /\.css/,
- use: ExtractTextPlugin.extract({
- fallback: 'style-loader',
- use: [
- 'css-loader?sourceMap',
- 'postcss-loader'
- ]
- })
- }
- ]
- },
- plugins: [
- new ExtractTextPlugin('styles.css')
- ]
- }
- module.exports = webpackConfig
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement