forked from barzin144/FlappyBird
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwebpack.common.js
More file actions
41 lines (40 loc) · 987 Bytes
/
Copy pathwebpack.common.js
File metadata and controls
41 lines (40 loc) · 987 Bytes
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
38
39
40
41
const CopyWebpackPlugin = require('copy-webpack-plugin');
module.exports = {
entry: {
main: "./src/index.js",
},
module: {
rules: [
{
test: /\.html$/,
use: ["html-loader"],
},
{
test: /\.(svg|png|jpg|gif)$/,
type: "asset/resource",
},
{
test: /\.(woff(2)?|ttf|eot|svg)(\?v=\d+\.\d+\.\d+)?$/,
use: [
{
loader: "file-loader",
options: {
name: "[name].[ext]",
outputPath: "fonts",
},
},
],
},
],
},
plugins: [
new CopyWebpackPlugin({
patterns: [
{ from: 'src/manifest-app.json', to: 'manifest-app.json' },
{ from: 'src/manifest-portal.json', to: 'manifest-portal.json' },
{ from: 'src/assets/wazo-bird-color.svg', to: 'imgs/wazo-bird-color.svg' },
{ from: 'src/assets/wazo-bird-white.svg', to: 'imgs/wazo-bird-white.svg' },
],
}),
],
};