@@ -72,22 +72,62 @@ module.exports = {
72
72
asset: {
73
73
// Generator options for asset modules
74
74
75
+ // The options for data url generator.
76
+ dataUrl: {
77
+ // Asset encoding (defaults to "base64")
78
+ // type: 'base64' | false
79
+ encoding: ' base64' ,
80
+ // Asset mimetype (getting from file extension by default).
81
+ // type: string
82
+ mimetype: ' image/png' ,
83
+ },
84
+
85
+ // Emit an output asset from this asset module. This can be set to 'false' to omit emitting e. g. for SSR.
86
+ // type: boolean
87
+ emit: true ,
88
+
89
+ // Customize filename for this asset module
90
+ // type: string | ((pathData: PathData, assetInfo?: AssetInfo) => string)
91
+ filename: ' static/[path][name][ext]' ,
92
+
75
93
// Customize publicPath for asset modules, available since webpack 5.28.0
94
+ // type: string | ((pathData: PathData, assetInfo?: AssetInfo) => string)
76
95
publicPath: ' https://cdn/assets/' ,
77
96
78
97
// Emit the asset in the specified folder relative to 'output.path', available since webpack 5.67.0
98
+ // type: string | ((pathData: PathData, assetInfo?: AssetInfo) => string)
79
99
outputPath: ' cdn-assets/' ,
80
100
},
81
101
' asset/inline' : {
82
102
// Generator options for asset/inline modules
103
+
104
+ // The options for data url generator.
105
+ dataUrl: {
106
+ // Asset encoding (defaults to "base64")
107
+ // type: 'base64' | false
108
+ encoding: ' base64' ,
109
+ // Asset mimetype (getting from file extension by default).
110
+ // type: string
111
+ mimetype: ' image/png' ,
112
+ },
83
113
},
84
114
' asset/resource' : {
85
115
// Generator options for asset/resource modules
86
116
117
+ // Emit an output asset from this asset module. This can be set to 'false' to omit emitting e. g. for SSR.
118
+ // type: boolean
119
+ emit: true ,
120
+
121
+ // Customize filename for this asset module
122
+ // type: string | ((pathData: PathData, assetInfo?: AssetInfo) => string)
123
+ filename: ' static/[path][name][ext]' ,
124
+
87
125
// Customize publicPath for asset/resource modules, available since webpack 5.28.0
126
+ // type: string | ((pathData: PathData, assetInfo?: AssetInfo) => string)
88
127
publicPath: ' https://cdn/assets/' ,
89
128
90
129
// Emit the asset in the specified folder relative to 'output.path', available since webpack 5.67.0
130
+ // type: string | ((pathData: PathData, assetInfo?: AssetInfo) => string)
91
131
outputPath: ' cdn-assets/' ,
92
132
},
93
133
javascript: {
0 commit comments