Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor deep rxjs imports and use named define #608

Merged
merged 2 commits into from
Jun 27, 2019
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions src/jwt.interceptor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@ import {
} from '@angular/common/http';
import { JwtHelperService } from './jwthelper.service';
import { JWT_OPTIONS } from './jwtoptions.token';
import { Observable } from "rxjs/internal/Observable";
import { from } from "rxjs/internal/observable/from";
import { from, Observable } from "rxjs";
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should have single quotes?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just reused the current style.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would be good to have single quotes, but I'm going to do a Prettier pass on it before the next release anyway.

import { mergeMap } from 'rxjs/operators';
import { parse } from 'url';

Expand Down
10 changes: 4 additions & 6 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,6 @@ const helpers = require('./config/helpers'),
/**
* Webpack Plugins
*/
const ProvidePlugin = require('webpack/lib/ProvidePlugin');
const DefinePlugin = require('webpack/lib/DefinePlugin');
const LoaderOptionsPlugin = require('webpack/lib/LoaderOptionsPlugin');

module.exports = {
devtool: 'inline-source-map',
Expand All @@ -26,13 +23,14 @@ module.exports = {
path: helpers.root('bundles'),
publicPath: '/',
filename: 'core.umd.js',
library: 'angular-jwt',
library: '@auth0/angular-jwt',
libraryTarget: 'umd',
globalObject: 'typeof self !== \'undefined\' ? self : this'
umdNamedDefine: true,
globalObject: 'typeof self !== \'undefined\' ? self : this',
},

// require those dependencies but don't bundle them
externals: [/^\@angular\//, /^rxjs\//],
externals: [/^\@angular\//, /^rxjs\/?/],

module: {
rules: [
Expand Down