const path = require("path"); const miniCssExtractPlugin = require("mini-css-extract-plugin"); module.exports = { entry: "./src/index.js", output: { path: path.resolve(__dirname, "lib"), filename: "index.bundle.js", }, plugins: [new miniCssExtractPlugin()], module: { rules: [ { test: /\.js$/, exclude: /node_modules/, use: { loader: "babel-loader", options: { presets: ["@babel/preset-env"], }, }, }, { test: /\.css$/, use: ["style-loader", "css-loader"], }, { test: /\.scss$/, use: [ { // Adds CSS to the DOM by injecting a `