Skip to content

oas/vue-ssr-loader

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

11 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Why is this necessary?

TODO

Example

Modification

In order to be able to represent both the client and the server in a single file, we divide them into tags. The <client> tag includes everything that will be minified and injected into the template. The <server> tag will be executed on the server, the result will be passed to a vue instance.

<client>
  <template>
    <p>Hi {{name}}!</p>
  </template>

  <style>
    /* This will change the appearance of our <p> tag. */
    p {
      color: red;
    }
  </style>

  <script>
    console.info("This will show up in our DevTools. πŸŽ‰");
  </script>
</client>

<server>
  <script>
    // This will be passed to a vue instance.
    module.exports = {
      data: function () {
        return {
          name: "oas"
        }
      }
    };
  </script>
</server>

About

πŸ“ Server Side Rendering without webpack

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published