-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: App multi-tenancy support in single ServerCore instance
- Loading branch information
1 parent
eb72e95
commit 6f0220f
Showing
9 changed files
with
327 additions
and
217 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,45 @@ | ||
const TerserPlugin = require('terser-webpack-plugin'); | ||
const webpack = require('webpack'); | ||
|
||
module.exports = function override(config, env) { | ||
config.optimization = { minimize: false }; | ||
config.optimization = { | ||
minimizer: [ | ||
new TerserPlugin({ | ||
cache: true, | ||
parallel: true, | ||
chunkFilter: (chunk) => chunk.name.indexOf('babel') === -1 // && chunk.name.indexOf('vendors') === -1 | ||
}) | ||
], | ||
splitChunks: { | ||
chunks: 'all', | ||
minSize: 30000, | ||
maxSize: 0, | ||
minChunks: 1, | ||
maxAsyncRequests: 5, | ||
maxInitialRequests: 3, | ||
automaticNameDelimiter: '~', | ||
name: true, | ||
cacheGroups: { | ||
babel: { | ||
test: /babel/, | ||
priority: -5 | ||
}, | ||
vendors: { | ||
test: /[\\/]node_modules[\\/]/, | ||
priority: -10 | ||
}, | ||
default: { | ||
priority: -20 | ||
} | ||
} | ||
} | ||
}; | ||
config.stats = 'verbose'; | ||
config.plugins = config.plugins.concat([ | ||
new webpack.ProgressPlugin() | ||
]); | ||
if (env === 'production') { | ||
config.devtool = false; | ||
} | ||
return config; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.