After installing msal-browser and only importing import { PublicClientApplication } from '@azure/msal-browser';, the bundle size increases by over 600kb. Is this the expected bundle size or am I missing something.
I am using vite with the following configuration:
export default defineConfig({
cacheDir: '../../../../node_modules/.vite/shared-ui-login-react',
plugins: [
react(),
nxViteTsPaths(),
visualizer({ emitFile: true, filename: 'stats.html' }) as PluginOption,
],
// Uncomment this if you are using workers.
// worker: {
// plugins: [ nxViteTsPaths() ],
// },
build: {
lib: {
// Could also be a dictionary or array of multiple entry points.
entry: 'src/index.ts',
name: 'login-react',
fileName: 'index',
// Change this to the formats you want to support.
// Don't forget to update your package.json as well.
formats: ['es', 'cjs'],
},
rollupOptions: {
// External packages that should not be bundled into your library.
external: ['react', 'react-dom', 'react/jsx-runtime'],
},
},
test: {
globals: true,
cache: {
dir: '../../../../node_modules/.vitest',
},
environment: 'jsdom',
include: ['src/**/*.{test,spec}.{js,mjs,cjs,ts,mts,cts,jsx,tsx}'],
},
});
Core Library
MSAL.js (@azure/msal-browser)
Core Library Version
3.5.0
Wrapper Library
Not Applicable
Wrapper Library Version
None
Public or Confidential Client?
Public
Description
After installing msal-browser and only importing
import { PublicClientApplication } from '@azure/msal-browser';
, the bundle size increases by over 600kb. Is this the expected bundle size or am I missing something.I am using vite with the following configuration:
MSAL Configuration
No response
Relevant Code Snippets
No response
Identity Provider
None
Source
External (Customer)