Is there a way to load every label data and every SObject description data using only Javascript without any Apex Server-side code?
How do I import * from @salesforce/schema or @salesforce/label?
I am looking for a way to get all labels or all SObject describe information details to retrieve in LWC at once.
I can see that such syntax is provided by ES6 and is used widely by Salesforce itself, however, it is not possible to use the following syntax in LWC:
import * as schema from '@salesforce/schema'
import * as label from '@salesforce/label'
or this syntax
import {label, schema} from '@salesforce';
since both versions generate error
LWC1512: Missing resource value for @salesforce"
or
LWC1512: Missing resource value for @salesforce/label
Is there a way to load every label data and every SObject description data using only Javascript without any Apex Server-side code?
By the way, if we look as Salesforce Playground we could notice that
the same syntax is used to import everything from
lwc
import * as Engine from 'lwc';
however, if we try to insert such line into any of Lightning Web Component, we would receive the following error
LWC1001: Invalid import. Namespace imports are not allowed on "lwc", instead use named imports "import { LightningElement } from 'lwc'" or LWC1517: Invalid LWC import
import * from
is used in Playground example, it is not possible to use the same line in the LWC component itself.import * from