Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const path = require('path')
- const MiniCssExtractPlugin = require('mini-css-extract-plugin')
- module.exports = {
- entry: {
- app: "./src/index.js"
- },
- output: {
- filename: "[name].js",
- path: path.resolve(__dirname, './dist/'),
- publicPath: "/dist/"
- },
- module : {
- rules: [
- {
- test: /\.js$/,
- exclude: '/node_modules/',
- loader: 'babel-loader'
- },
- {
- test: /\.css$/,
- use: [
- {
- loader: MiniCssExtractPlugin.loader
- },
- {
- loader: 'css-loader'
- },
- {
- loader: 'postcss-loader',
- options: {config: {path:'src/js/postcss.config.js'}}
- }
- ]
- }
- ]
- },
- devServer: {
- overlay: true
- },
- plugins: [
- new MiniCssExtractPlugin({
- filename: "[name].css"
- })
- ],
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement