mirror of
https://github.com/BeardedTek/flowbite-beardedtek.com.git
synced 2025-12-06 05:31:52 +00:00
INITIAL COMMIT
This commit is contained in:
49
webpack.config.js
Normal file
49
webpack.config.js
Normal file
@@ -0,0 +1,49 @@
|
||||
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
|
||||
const CssMinimizerPlugin = require("css-minimizer-webpack-plugin");
|
||||
const { SourceMapDevToolPlugin } = require("webpack");
|
||||
const path = require('path');
|
||||
|
||||
module.exports = {
|
||||
entry: {
|
||||
app: path.resolve(__dirname, 'src/app.js')
|
||||
},
|
||||
output: {
|
||||
filename: '[name].bundle.js',
|
||||
path: path.resolve(__dirname, 'static/'),
|
||||
},
|
||||
module: {
|
||||
rules: [
|
||||
{
|
||||
test: /\.css$/,
|
||||
use: [MiniCssExtractPlugin.loader, 'css-loader', 'postcss-loader'],
|
||||
},
|
||||
{
|
||||
test: /\.(png|jpg|gif|svg)$/,
|
||||
loader: 'file-loader',
|
||||
options: {
|
||||
outputPath: 'static/images/'
|
||||
}
|
||||
},
|
||||
{
|
||||
test: /\.(ttf|eot|svg|gif|woff|woff2)(\?v=[0-9]\.[0-9]\.[0-9])?$/,
|
||||
use: [{
|
||||
loader: 'file-loader',
|
||||
}]
|
||||
},
|
||||
],
|
||||
},
|
||||
resolve: {
|
||||
extensions: ['', '.js', '.jsx', '.css']
|
||||
},
|
||||
plugins: [
|
||||
new MiniCssExtractPlugin(),
|
||||
new SourceMapDevToolPlugin({
|
||||
filename: "[file].map"
|
||||
})
|
||||
],
|
||||
optimization: {
|
||||
minimizer: [
|
||||
new CssMinimizerPlugin()
|
||||
]
|
||||
},
|
||||
};
|
||||
Reference in New Issue
Block a user