You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-`rootpath`: path used for resolving inlineable paths.
57
57
-`noAssetMatchReplace`: work with `noAssetMatch` option.(default `<!-- -->`)
58
-
-`noAssetMatch`: define the behaviour while no asset match the value of `inline-asset` attribute.(default `1`)
59
-
-`0`: do nothing and the tag is still reserved in the html.
60
-
-`1`: throw warning tips and replace the tag with the content of `noAssetMatchReplace` option.
61
-
-`2`: throw error tips and replace the tag with the content of `noAssetMatchReplace` option(This level will affect the compilation of webpack).
58
+
-`noAssetMatch`: define the behaviour while no asset match the value of `inline-asset` attribute.(default `none`)
59
+
-`none`: do nothing and the tag is still reserved in the html.
60
+
-`warn`: throw warning tips and replace the tag with the content of `noAssetMatchReplace` option.
61
+
-`error`: throw error tips and replace the tag with the content of `noAssetMatchReplace` option(This level will affect the compilation of webpack).
62
62
63
63
```javascript
64
64
// webpack.config.js
@@ -73,7 +73,8 @@ module.exports = {
73
73
}),
74
74
newInlineSourceWebpackPlugin({
75
75
compress:true,
76
-
rootpath:'./src'
76
+
rootpath:'./src',
77
+
noAssetMatch:'warn'
77
78
})
78
79
]
79
80
};
@@ -87,7 +88,7 @@ Add `inline-asset-delete` attribute for deleting the asset after inline task.
87
88
```
88
89
89
90
The value of `inline-asset` attribute is a *regular expression*.
90
-
91
+
91
92
Note: For `inline-asset` feature, you may notice the 'no asset match' warning or error in developement mode as you write the regular expression for the production mode.Just ignore the 'no asset match' warning or error while in developement mode.Or you can provide `noAssetMatch` option for ignoring the warning or error;
0 commit comments