Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,9 @@ console.log('Current user:', authn.currentUser());

## 🌐 Use directly in a browser

Both UMD and ESM bundles externalize rdflib to keep bundle sizes small and avoid version conflicts.
The UMD bundles externalize `rdflib` only.

The ESM bundles externalize both `rdflib` and the auth library packages `@uvdsl/solid-oidc-client-browser` / `@uvdsl/solid-oidc-client-browser/core`.
Comment on lines +32 to +34

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we do not need to be so specific. No need to commit this suggestions.


## Available Files

Expand Down
18 changes: 5 additions & 13 deletions webpack.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,7 @@ const externalsBase = {
'@trust/webcrypto': 'crypto',
'@xmldom/xmldom': 'window',
'whatwg-url': 'URL',
'rdflib': '$rdf',
'@uvdsl/solid-oidc-client-browser': {
commonjs: '@uvdsl/solid-oidc-client-browser',
commonjs2: '@uvdsl/solid-oidc-client-browser',
amd: '@uvdsl/solid-oidc-client-browser',
root: 'SolidOidcClientBrowser'
},
'@uvdsl/solid-oidc-client-browser/core': {
commonjs: '@uvdsl/solid-oidc-client-browser/core',
commonjs2: '@uvdsl/solid-oidc-client-browser/core',
amd: '@uvdsl/solid-oidc-client-browser/core',
root: 'SolidOidcClientBrowserCore'
}
'rdflib': '$rdf'
}

const externalsESM = {
Expand Down Expand Up @@ -73,6 +61,7 @@ export default [
},
externals: externalsBase,
optimization: {
...commonConfig.optimization,
minimize: false
}
},
Expand All @@ -93,6 +82,7 @@ export default [
},
externals: externalsBase,
optimization: {
...commonConfig.optimization,
minimize: true,
minimizer: [new TerserPlugin({ extractComments: false })]
}
Expand All @@ -115,6 +105,7 @@ export default [
outputModule: true
},
optimization: {
...commonConfig.optimization,
minimize: false
}
},
Expand All @@ -136,6 +127,7 @@ export default [
outputModule: true
},
optimization: {
...commonConfig.optimization,
minimize: true,
minimizer: [new TerserPlugin({ extractComments: false })]
}
Expand Down
Loading