great-website/webpack.config.js
Kumi a8e856ba17
feat: remove autoprefixer from webpack config
Removed autoprefixer from the webpack configuration to simplify the
build process. This change reduces dependencies and potential build
issues, aligning with efforts to streamline development workflows.
Future CSS prefixing needs will be evaluated for more integrated
solutions.
2024-03-28 09:15:32 +01:00

48 lines
1.1 KiB
JavaScript

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 `<style>` tag
loader: "style-loader",
},
{
// Interprets `@import` and `url()` like `import/require()` and will resolve them
loader: "css-loader",
},
{
// Loads a SASS/SCSS file and compiles it to CSS
loader: "sass-loader",
},
],
},
],
},
};