-
Notifications
You must be signed in to change notification settings - Fork 1k
Closed
Closed
Copy link
Labels
area:spfxCategory: SharePoint Framework (not extensions related)Category: SharePoint Framework (not extensions related)status:to-be-reviewedIssue needs to be reviewed by Microsoft for additional follow up / review.Issue needs to be reviewed by Microsoft for additional follow up / review.type:questionQuestion... if answered, will be tagged as such.Question... if answered, will be tagged as such.
Description
Category
- Question
- Typo
- Bug
- Additional article idea
Expected or Desired Behavior
For an SPFx library component bundle, the entry point in the config/config.json
should be the /lib/index.js
file:
"bundles": {
"my-custom-library": {
"components": [
{
"entrypoint": "./lib/index.js",
"manifest": "./src/CustomOfficeUiFabricLibrary.manifest.json"
}
]
}
},
Observed Behavior
In 1.8.2-plusbeta
if a library component was created, the config/config.json
had the bundle defined as:
"bundles": {
"my-custom-library": {
"components": [
{
"entrypoint": "./lib/index.js",
"manifest": "./src/CustomOfficeUiFabricLibrary.manifest.json"
}
]
}
},
Since 1.9.1
the bundle entrypoint is now the default exported class:
"bundles": {
"my-custom-library": {
"components": [
{
"entrypoint": "./lib/libraries/customOfficeUiFabric/CustomOfficeUiFabricLibrary.js",
"manifest": "./src/libraries/customOfficeUiFabric/CustomOfficeUiFabricLibrary.manifest.json"
}
]
}
},
So if we add any more components to the library like this:
and then add the export to the index.ts
file:
export { ButtonComponent } from './customFabric/ButtonComponent';
The components does not get included in the final bundle because the bundle entry point is pointing to the default class.
Steps to Reproduce
Create a library component project with SPFx generator version 1.9.1
and observe the config/config.json
file
Thanks for your contribution! Sharing is caring.
Metadata
Metadata
Assignees
Labels
area:spfxCategory: SharePoint Framework (not extensions related)Category: SharePoint Framework (not extensions related)status:to-be-reviewedIssue needs to be reviewed by Microsoft for additional follow up / review.Issue needs to be reviewed by Microsoft for additional follow up / review.type:questionQuestion... if answered, will be tagged as such.Question... if answered, will be tagged as such.