forked from okta/okta-auth-js
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwebpack.config.js
More file actions
31 lines (28 loc) · 941 Bytes
/
Copy pathwebpack.config.js
File metadata and controls
31 lines (28 loc) · 941 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
/*
* This config builds a minified version that can be imported
* anywhere without any dependencies. It also preserves license comments.
*/
var path = require('path');
var webpack = require('webpack');
var fs = require('fs');
var _ = require('lodash');
var commonConfig = require('./webpack.common.config');
var license = fs.readFileSync('lib/license-header.txt', 'utf8');
module.exports = _.extend({}, _.cloneDeep(commonConfig), {
mode: (process.env.NODE_ENV === 'development') ? 'development' : 'production',
entry: {
'okta-auth-js': './lib/index.ts',
'myaccount': './lib/myaccount/index.ts'
},
output: {
path: path.join(__dirname, 'build', 'dist'),
filename: '[name].umd.js',
library: 'OktaAuth',
libraryTarget: 'umd'
},
plugins: commonConfig.plugins.concat([
// Add a single Okta license after removing others
new webpack.BannerPlugin(license)
]),
devtool: 'source-map'
});