I just learned webpack and i got problem when run npm run start-dev
my css not loaded. how to fix it?
this code on webpack.config.js:
const path = require("path");
module.exports = {
entry: "./src/index.js",
output: {
path: path.resolve(__dirname, "dist"),
filename: "bundle.js"
},
mode: "production",
module: {
rules: [
{
test: /\.css$/,
use: [
{
loader: "style-loader"
},
{
loader: "css-loader"
}
]
}
]
}
}
this code on index.js
import "./style/style.css";
import $ from 'jQuery'
import 'bootstrap';
console.log("berhasil tehubung");