- Installed style-loader and css-loader - Configured webpack.config to use both loaders on css files - Remember the order we use them in webpack.config matters
18 lines
305 B
JavaScript
18 lines
305 B
JavaScript
const path = require("path");
|
|
module.exports = {
|
|
mode: "development",
|
|
entry: "./src/index.js",
|
|
output: {
|
|
filename: "main.js",
|
|
path: path.resolve(__dirname, "dist")
|
|
},
|
|
module: {
|
|
rules: [
|
|
{
|
|
test: /\.css$/,
|
|
use: ["style-loader", "css-loader"]
|
|
}
|
|
]
|
|
}
|
|
};
|