File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -11,6 +11,11 @@ const defaultOptions = {
1111 manifestSync : [ 'version' ] ,
1212 modesToZip : [ 'production' ]
1313}
14+ const performanceAssetFilterList = [
15+ ( file ) => ! ( / \. m a p $ / . test ( file ) ) ,
16+ ( file ) => ! file . endsWith ( '.zip' ) ,
17+ ( file ) => ! ( / ^ i c o n s \/ / . test ( file ) )
18+ ]
1419
1520module . exports = ( api , options ) => {
1621 const appRootPath = api . getCwd ( )
@@ -47,6 +52,11 @@ module.exports = (api, options) => {
4752 webpackConfig . output . chunkFilename = 'js/[id].[name].js'
4853 webpackConfig . node . global = false
4954
55+ if ( webpackConfig . performance === undefined ) {
56+ webpackConfig . performance = { }
57+ }
58+ webpackConfig . performance . assetFilter = ( assetFilename ) => performanceAssetFilterList . every ( ( filter ) => filter ( assetFilename ) )
59+
5060 if ( pluginOptions . autoImportPolyfill ) {
5161 webpackConfig . plugins . push ( new webpack . ProvidePlugin ( {
5262 'browser' : 'webextension-polyfill'
You can’t perform that action at this time.
0 commit comments