auth0-lock 14.2.5 → 15.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/webpack.config.js CHANGED
@@ -2,6 +2,8 @@ const { spawnSync } = require('child_process');
2
2
  const fs = require('fs');
3
3
  const tmp = require('tmp');
4
4
  const path = require('path');
5
+ const pkg = require('./package.json');
6
+ const coreJsVersion = pkg.devDependencies['core-js'].replace(/^\^/, '');
5
7
 
6
8
  /**
7
9
  * This is a helper function to generate valid certs using mkcert.
@@ -44,7 +46,11 @@ module.exports = {
44
46
  devServer: {
45
47
  hot: true,
46
48
  port: 3000,
47
- https: getDevCerts() || true,
49
+ allowedHosts: 'all',
50
+ server: {
51
+ type: 'https',
52
+ options: getDevCerts() || {}
53
+ },
48
54
  static: {
49
55
  directory: path.join(__dirname, 'support'),
50
56
  publicPath: '/support'
@@ -57,6 +63,20 @@ module.exports = {
57
63
  },
58
64
  module: {
59
65
  rules: [
66
+ {
67
+ // auth0-password-policies uses ES2020+ syntax (optional chaining) that
68
+ // must be transpiled for the IE 11 / ES2017 build target. Babel's
69
+ // .babelrc is file-relative and does not apply across package
70
+ // boundaries, so presets are passed explicitly here.
71
+ test: /\.js$/,
72
+ include: path.join(__dirname, 'node_modules', 'auth0-password-policies'),
73
+ loader: 'babel-loader',
74
+ options: {
75
+ presets: [['@babel/preset-env', { useBuiltIns: 'entry', corejs: coreJsVersion }]],
76
+ configFile: false,
77
+ babelrc: false
78
+ }
79
+ },
60
80
  {
61
81
  test: /\.jsx?$/,
62
82
  loader: 'babel-loader',