Git Product home page Git Product logo

hackday-wc-mdx's Introduction

Next.js App Router Project with Stencil.js Web Components

This project shows how we got Stencil.js Web Components working inside the Next.js app directory.

Big thanks goes out to Wesley Luyten who created WeSC which served as base of ./packages/web-components-react-wrapper. Also we like to thank Mux for there Web Components React build script which helped us to create our Stencil React Wrapper. 🙏

How to run the Next.js app

  1. Run npm ci.

  2. Run either npm run app:dev or npm run app:start

  3. Open http://localhost:3000

    The Web Components from ./packages/web-components are rendered server-side. 🎉

Disclaimer

We use a patched version of Stencil.js because by default Stencil.js does not fallback to globalThis when there is no window available e.g. on the server. A pull request which would add this feature and the corresponding issue was closed by the Stencil.js Team. 😔

hackday-wc-mdx's People

Contributors

renovate[bot] avatar dwirz avatar

Stargazers

Ces avatar

Watchers

Alain avatar Luca avatar Ces avatar Tim Grünewald avatar Daniel avatar James Bampoe avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.