build: exclude rxjs operators and testing from resulting bundle

This commit is contained in:
Roman Hotsiy 2017-02-25 23:32:18 +02:00
parent f1bd4a7a82
commit dcb97a5b96
No known key found for this signature in database
GPG Key ID: 5CB7B3ACABA57CB0
2 changed files with 4 additions and 2 deletions

0
build/empty.js Normal file
View File

View File

@ -82,7 +82,7 @@ module.exports = function (options) {
},
{
test: /lib[\\\/].*\.scss$/,
loaders: ['raw-loader', "sass-loader"],
loaders: ['raw-loader', 'sass-loader'],
exclude: [/redoc-initial-styles\.scss$/]
},
{
@ -110,7 +110,9 @@ module.exports = function (options) {
'AOT': options.AOT
}),
new StringReplacePlugin()
new StringReplacePlugin(),
new webpack.NormalModuleReplacementPlugin(/node_modules\/rxjs\/operator\/.*/, root('build/empty.js')),
new webpack.NormalModuleReplacementPlugin(/node_modules\/rxjs\/testing\//, root('build/empty.js'))
],
node: {
global: true,