Skip to content

Commit

Permalink
build: exclude rxjs operators and testing from resulting bundle
Browse files Browse the repository at this point in the history
  • Loading branch information
RomanHotsiy committed Feb 25, 2017
1 parent f1bd4a7 commit dcb97a5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Empty file added build/empty.js
Empty file.
6 changes: 4 additions & 2 deletions build/webpack.common.js
Original file line number Diff line number Diff line change
Expand Up @@ -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$/]
},
{
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit dcb97a5

Please sign in to comment.