From 8b0cf43f63f1b0a6166c02c63be30a5d97af027b Mon Sep 17 00:00:00 2001 From: Dan Saunders Date: Mon, 14 Oct 2024 15:59:11 -0700 Subject: [PATCH] fix sample not loading in es6 runtime (#873) --- .../auth/Outlook-Event-SSO-NAA/package-lock.json | 8 ++++---- Samples/auth/Outlook-Event-SSO-NAA/package.json | 4 ++-- .../auth/Outlook-Event-SSO-NAA/webpack.config.js | 14 +++++++++++--- 3 files changed, 17 insertions(+), 9 deletions(-) diff --git a/Samples/auth/Outlook-Event-SSO-NAA/package-lock.json b/Samples/auth/Outlook-Event-SSO-NAA/package-lock.json index b2f6ad2a7..ff1b6f286 100644 --- a/Samples/auth/Outlook-Event-SSO-NAA/package-lock.json +++ b/Samples/auth/Outlook-Event-SSO-NAA/package-lock.json @@ -9,7 +9,7 @@ "version": "0.0.1", "license": "MIT", "dependencies": { - "@azure/msal-browser": "^3.24.0", + "@azure/msal-browser": "^3.26.1", "core-js": "^3.36.0", "regenerator-runtime": "^0.14.1" }, @@ -509,9 +509,9 @@ } }, "node_modules/@azure/msal-browser": { - "version": "3.24.0", - "resolved": "https://registry.npmjs.org/@azure/msal-browser/-/msal-browser-3.24.0.tgz", - "integrity": "sha512-JGNV9hTYAa7lsum9IMIibn2kKczAojNihGo1hi7pG0kNrcKej530Fl6jxwM05A44/6I079CSn6WxYxbVhKUmWg==", + "version": "3.26.1", + "resolved": "https://registry.npmjs.org/@azure/msal-browser/-/msal-browser-3.26.1.tgz", + "integrity": "sha512-y78sr9g61aCAH9fcLO1um+oHFXc1/5Ap88RIsUSuzkm0BHzFnN+PXGaQeuM1h5Qf5dTnWNOd6JqkskkMPAhh7Q==", "dependencies": { "@azure/msal-common": "14.15.0" }, diff --git a/Samples/auth/Outlook-Event-SSO-NAA/package.json b/Samples/auth/Outlook-Event-SSO-NAA/package.json index d590498e5..dd54f94ed 100644 --- a/Samples/auth/Outlook-Event-SSO-NAA/package.json +++ b/Samples/auth/Outlook-Event-SSO-NAA/package.json @@ -28,7 +28,7 @@ "watch": "webpack --mode development --watch" }, "dependencies": { - "@azure/msal-browser": "^3.24.0", + "@azure/msal-browser": "^3.26.1", "core-js": "^3.36.0", "regenerator-runtime": "^0.14.1" }, @@ -62,4 +62,4 @@ "last 2 versions", "ie 11" ] -} \ No newline at end of file +} diff --git a/Samples/auth/Outlook-Event-SSO-NAA/webpack.config.js b/Samples/auth/Outlook-Event-SSO-NAA/webpack.config.js index 6e1072eff..1267f2461 100644 --- a/Samples/auth/Outlook-Event-SSO-NAA/webpack.config.js +++ b/Samples/auth/Outlook-Event-SSO-NAA/webpack.config.js @@ -32,14 +32,22 @@ module.exports = async (env, options) => { module: { rules: [ { - test: /\.js$/, + test: /\.m?js$/, // exclude: /node_modules/, // Exclude all node_modules except @azure include: [path.resolve(__dirname, "node_modules/@azure"), path.resolve(__dirname, "src")], - exclude: /node_modules/, use: { loader: "babel-loader", options: { - presets: ["@babel/preset-env"], + presets: [ + [ + "@babel/preset-env", + { + targets: { + browsers: ["since 2015"], // Create a bundle that is compatible with loading in older versions of Office clients. + }, + }, + ], + ], }, }, },