Skip to main content
4 events
when toggle format what by license comment
May 26, 2022 at 19:22 comment added nickforce If I need to use a CommonJS method like 'requires' for example, should I be adding an installed node module to my LWR.Config.JSON?
May 26, 2022 at 17:24 comment added sfdcfox @nickforce In LWC OSS, import { LightningElement } from 'lwc' is actually importing from an installed node module called lwc. This is done via webpack to build the components and babel to provide backwards compatibility for older browsers. As such, the example should work fine if you've installed a library that does something you need to do.
May 26, 2022 at 16:37 comment added nickforce Thanks for the response! Can this still be accomplished when the module is an inbuilt node module that needs a "requires" statement instead of the ES6 "import"?
May 25, 2022 at 22:51 history answered sfdcfox CC BY-SA 4.0