Giter Site home page Giter Site logo

astro-imba-issue's Introduction

To reproduce:

  1. Try running npm run dev and see that both the mdx page and mdx post have a working/styled component in them.
  2. Try running npm run build then npm run preview and see that the mdx post now has no styles.

Issue Summary:

  • I installed the Imba vite plugin and enabled it in astro.config.mjs
  • I created an Imba file that defines a web component in src/imba-component.imba
  • I included that Imba file in an astro component (this is necessary to include it in an mdx file) inside src/components/ImbaComponentWrapper.astro
  • I included that astro component in two places:
    • An mdx page, defined in src/pages/test.mdx
    • A blog post mdx file, created using astro "content collections", the mdx file is in src/content/posts/test-post.mdx
  • Running npm run astro dev everything works, the page and the post both display the imba component correctly
  • Running npm run astro build then serving the dist/ folder with npx http-server dist reveals the problem: The component will have no CSS if viewed in the MDX post. The javascript counter functionality will work, but the styles are not there. The component renders correctly on the mdx page however.

astro-imba-issue's People

Contributors

astrobot-houston avatar trafnar avatar

Stargazers

 avatar

Watchers

 avatar

Forkers

haikyuu

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.