-
Notifications
You must be signed in to change notification settings - Fork 268
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c68c181
commit e86ef8f
Showing
9 changed files
with
109 additions
and
11 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
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 |
---|---|---|
@@ -0,0 +1,13 @@ | ||
// Polyfills objects needed to support IE 11+ | ||
require('core-js/fn/object/assign'); | ||
require('core-js/es/promise'); | ||
require('core-js/es/typed-array/uint8-array'); | ||
require('core-js/features/array/from'); | ||
require('core-js/web/url'); | ||
require('webcrypto-shim'); | ||
|
||
if (typeof window.TextEncoder !== 'function') { | ||
var TextEncodingPolyfill = require('text-encoding'); | ||
window.TextEncoder = TextEncodingPolyfill.TextEncoder; | ||
window.TextDecoder = TextEncodingPolyfill.TextDecoder; | ||
} |
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 |
---|---|---|
@@ -0,0 +1,36 @@ | ||
/* global __dirname */ | ||
var path = require('path'); | ||
var _ = require('lodash'); | ||
var commonConfig = require('./webpack.common.config'); | ||
var webpack = require('webpack'); | ||
var fs = require('fs'); | ||
|
||
var license = fs.readFileSync('lib/license-header.txt', 'utf8'); | ||
|
||
module.exports = _.extend({}, _.cloneDeep(commonConfig), { | ||
entry: './polyfill/index.js', | ||
output: { | ||
path: path.join(__dirname, 'dist'), | ||
filename: 'okta-auth-js.polyfill.js', | ||
library: 'OktaAuthPolyfill', | ||
libraryTarget: 'umd' | ||
}, | ||
plugins: commonConfig.plugins.concat([ | ||
new webpack.optimize.UglifyJsPlugin({ | ||
compress: { | ||
warnings: false | ||
}, | ||
sourceMap: true, | ||
comments: function(node, comment) { | ||
// Remove other Okta copyrights | ||
var isLicense = /^!/.test(comment.value); | ||
var isOkta = /.*Okta.*/.test(comment.value); | ||
return isLicense && !isOkta; | ||
} | ||
}), | ||
|
||
// Add a single Okta license after removing others | ||
new webpack.BannerPlugin(license) | ||
]), | ||
devtool: 'source-map' | ||
}); |
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
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