forked from jobsta/reportbro-designer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.common.js
37 lines (35 loc) · 1007 Bytes
/
webpack.common.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
const path = require('path');
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
module.exports = {
entry: ['./src/main.js', './src/main.css', './src/fonts/font_style.css', './src/iconfonts/style.css', './src/toggle-switch.css', './src/quill.reportbro.css'],
output: {
filename: 'reportbro.js',
path: path.resolve(__dirname, 'dist'),
},
performance : {
hints : false // disable warning for asset size limit (generated js file)
},
module: {
rules: [
{
test: /\.css$/, use: [MiniCssExtractPlugin.loader, 'css-loader'], },
{
test: /\.(png|gif)([\?]?.*)$/,
type: 'asset/resource',
generator: {
filename: '[path][name][ext]'
}
},
{
test: /\.(ttf|eot|svg|woff(2)?)(\?[a-z0-9=&.]+)?$/,
type: 'asset/resource',
generator: {
filename: '[path][name][ext]?[hash]'
}
},
]
},
plugins: [
new MiniCssExtractPlugin({filename: "reportbro.css"})
]
};