Can we See the lwc Module?












3















This page in the LWC developer guide talks about a component JS file, in particular:




Every UI component must include a JavaScript file with at least this code.



import { LightningElement } from 'lwc';
export default class MyComponent extends LightningElement {
}


The core module in Lightning Web Components is lwc. The import statement imports LightningElement from the lwc module.



import { LightningElement } from 'lwc';


LightningElement is a custom wrapper of the standard HTML element.




Presently I'm learning about JS modules and importing/exporting them. I understand that they are individual JS files.



So is there a way to see the lwc module referenced in the documentation? If possible, what is in it and what does it look like?










share|improve this question





























    3















    This page in the LWC developer guide talks about a component JS file, in particular:




    Every UI component must include a JavaScript file with at least this code.



    import { LightningElement } from 'lwc';
    export default class MyComponent extends LightningElement {
    }


    The core module in Lightning Web Components is lwc. The import statement imports LightningElement from the lwc module.



    import { LightningElement } from 'lwc';


    LightningElement is a custom wrapper of the standard HTML element.




    Presently I'm learning about JS modules and importing/exporting them. I understand that they are individual JS files.



    So is there a way to see the lwc module referenced in the documentation? If possible, what is in it and what does it look like?










    share|improve this question



























      3












      3








      3








      This page in the LWC developer guide talks about a component JS file, in particular:




      Every UI component must include a JavaScript file with at least this code.



      import { LightningElement } from 'lwc';
      export default class MyComponent extends LightningElement {
      }


      The core module in Lightning Web Components is lwc. The import statement imports LightningElement from the lwc module.



      import { LightningElement } from 'lwc';


      LightningElement is a custom wrapper of the standard HTML element.




      Presently I'm learning about JS modules and importing/exporting them. I understand that they are individual JS files.



      So is there a way to see the lwc module referenced in the documentation? If possible, what is in it and what does it look like?










      share|improve this question
















      This page in the LWC developer guide talks about a component JS file, in particular:




      Every UI component must include a JavaScript file with at least this code.



      import { LightningElement } from 'lwc';
      export default class MyComponent extends LightningElement {
      }


      The core module in Lightning Web Components is lwc. The import statement imports LightningElement from the lwc module.



      import { LightningElement } from 'lwc';


      LightningElement is a custom wrapper of the standard HTML element.




      Presently I'm learning about JS modules and importing/exporting them. I understand that they are individual JS files.



      So is there a way to see the lwc module referenced in the documentation? If possible, what is in it and what does it look like?







      javascript lightning-web-components






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited 8 hours ago









      Adrian Larson

      108k19115243




      108k19115243










      asked 9 hours ago









      Gabriel RiveraGabriel Rivera

      400113




      400113






















          2 Answers
          2






          active

          oldest

          votes


















          5














          Our intent is to open source LWC by the end of the year but it will ultimately come down to resourcing constraints because there's still a lot of work to do!



          There's not too much going on in the lwc module. There's basically LightningElement which exposes an API subset of HTMLElement (what we consider the "good parts"). There are also the various decorators (api, track, readonly, wire) and several other APIs that are only usable by our compiler.



          To answer your question though, a single file would be the simplest type of module, but a module can contain multiple files since we are able to import and export in the same file. You can event do that with a single line using module redirects.






          share|improve this answer































            0















            So is there a way to see the lwc module referenced in the documentation?




            Not that I know of.



            Unlike Lightning Aura Components, which was built on top of Open Source Aura Framework, Lightning Web Components model at least as of today is not Open Sourced. This is more of a platform implementation for Web Standards and that unless Salesforce opens it up, there's no way of accessing any base code implemented in the LWC model.






            share|improve this answer























              Your Answer








              StackExchange.ready(function() {
              var channelOptions = {
              tags: "".split(" "),
              id: "459"
              };
              initTagRenderer("".split(" "), "".split(" "), channelOptions);

              StackExchange.using("externalEditor", function() {
              // Have to fire editor after snippets, if snippets enabled
              if (StackExchange.settings.snippets.snippetsEnabled) {
              StackExchange.using("snippets", function() {
              createEditor();
              });
              }
              else {
              createEditor();
              }
              });

              function createEditor() {
              StackExchange.prepareEditor({
              heartbeatType: 'answer',
              autoActivateHeartbeat: false,
              convertImagesToLinks: false,
              noModals: true,
              showLowRepImageUploadWarning: true,
              reputationToPostImages: null,
              bindNavPrevention: true,
              postfix: "",
              imageUploader: {
              brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
              contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
              allowUrls: true
              },
              onDemand: true,
              discardSelector: ".discard-answer"
              ,immediatelyShowMarkdownHelp:true
              });


              }
              });














              draft saved

              draft discarded


















              StackExchange.ready(
              function () {
              StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsalesforce.stackexchange.com%2fquestions%2f249887%2fcan-we-see-the-lwc-module%23new-answer', 'question_page');
              }
              );

              Post as a guest















              Required, but never shown

























              2 Answers
              2






              active

              oldest

              votes








              2 Answers
              2






              active

              oldest

              votes









              active

              oldest

              votes






              active

              oldest

              votes









              5














              Our intent is to open source LWC by the end of the year but it will ultimately come down to resourcing constraints because there's still a lot of work to do!



              There's not too much going on in the lwc module. There's basically LightningElement which exposes an API subset of HTMLElement (what we consider the "good parts"). There are also the various decorators (api, track, readonly, wire) and several other APIs that are only usable by our compiler.



              To answer your question though, a single file would be the simplest type of module, but a module can contain multiple files since we are able to import and export in the same file. You can event do that with a single line using module redirects.






              share|improve this answer




























                5














                Our intent is to open source LWC by the end of the year but it will ultimately come down to resourcing constraints because there's still a lot of work to do!



                There's not too much going on in the lwc module. There's basically LightningElement which exposes an API subset of HTMLElement (what we consider the "good parts"). There are also the various decorators (api, track, readonly, wire) and several other APIs that are only usable by our compiler.



                To answer your question though, a single file would be the simplest type of module, but a module can contain multiple files since we are able to import and export in the same file. You can event do that with a single line using module redirects.






                share|improve this answer


























                  5












                  5








                  5







                  Our intent is to open source LWC by the end of the year but it will ultimately come down to resourcing constraints because there's still a lot of work to do!



                  There's not too much going on in the lwc module. There's basically LightningElement which exposes an API subset of HTMLElement (what we consider the "good parts"). There are also the various decorators (api, track, readonly, wire) and several other APIs that are only usable by our compiler.



                  To answer your question though, a single file would be the simplest type of module, but a module can contain multiple files since we are able to import and export in the same file. You can event do that with a single line using module redirects.






                  share|improve this answer













                  Our intent is to open source LWC by the end of the year but it will ultimately come down to resourcing constraints because there's still a lot of work to do!



                  There's not too much going on in the lwc module. There's basically LightningElement which exposes an API subset of HTMLElement (what we consider the "good parts"). There are also the various decorators (api, track, readonly, wire) and several other APIs that are only usable by our compiler.



                  To answer your question though, a single file would be the simplest type of module, but a module can contain multiple files since we are able to import and export in the same file. You can event do that with a single line using module redirects.







                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered 7 hours ago









                  Eugene KashidaEugene Kashida

                  33125




                  33125

























                      0















                      So is there a way to see the lwc module referenced in the documentation?




                      Not that I know of.



                      Unlike Lightning Aura Components, which was built on top of Open Source Aura Framework, Lightning Web Components model at least as of today is not Open Sourced. This is more of a platform implementation for Web Standards and that unless Salesforce opens it up, there's no way of accessing any base code implemented in the LWC model.






                      share|improve this answer




























                        0















                        So is there a way to see the lwc module referenced in the documentation?




                        Not that I know of.



                        Unlike Lightning Aura Components, which was built on top of Open Source Aura Framework, Lightning Web Components model at least as of today is not Open Sourced. This is more of a platform implementation for Web Standards and that unless Salesforce opens it up, there's no way of accessing any base code implemented in the LWC model.






                        share|improve this answer


























                          0












                          0








                          0








                          So is there a way to see the lwc module referenced in the documentation?




                          Not that I know of.



                          Unlike Lightning Aura Components, which was built on top of Open Source Aura Framework, Lightning Web Components model at least as of today is not Open Sourced. This is more of a platform implementation for Web Standards and that unless Salesforce opens it up, there's no way of accessing any base code implemented in the LWC model.






                          share|improve this answer














                          So is there a way to see the lwc module referenced in the documentation?




                          Not that I know of.



                          Unlike Lightning Aura Components, which was built on top of Open Source Aura Framework, Lightning Web Components model at least as of today is not Open Sourced. This is more of a platform implementation for Web Standards and that unless Salesforce opens it up, there's no way of accessing any base code implemented in the LWC model.







                          share|improve this answer












                          share|improve this answer



                          share|improve this answer










                          answered 8 hours ago









                          Jayant DasJayant Das

                          14k2824




                          14k2824






























                              draft saved

                              draft discarded




















































                              Thanks for contributing an answer to Salesforce Stack Exchange!


                              • Please be sure to answer the question. Provide details and share your research!

                              But avoid



                              • Asking for help, clarification, or responding to other answers.

                              • Making statements based on opinion; back them up with references or personal experience.


                              To learn more, see our tips on writing great answers.




                              draft saved


                              draft discarded














                              StackExchange.ready(
                              function () {
                              StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsalesforce.stackexchange.com%2fquestions%2f249887%2fcan-we-see-the-lwc-module%23new-answer', 'question_page');
                              }
                              );

                              Post as a guest















                              Required, but never shown





















































                              Required, but never shown














                              Required, but never shown












                              Required, but never shown







                              Required, but never shown

































                              Required, but never shown














                              Required, but never shown












                              Required, but never shown







                              Required, but never shown







                              Popular posts from this blog

                              Ponta tanko

                              Tantalo (mitologio)

                              Erzsébet Schaár