Open timbasel opened 4 years ago
Unfortunately I'm unable to get Astroturf working with Parcel and Typescript.
Without Typescript everything works fine. But with it i just get a ReferenceError: css is not defined execption in the browser (Parcel builds fine)
ReferenceError: css is not defined
PS: Thank you all for the amazing looking library.
index.tsx
import React, { FunctionComponent } from "react"; import { render} from "react-dom"; import { css } from "astroturf"; const styles = css` .parcel { color: green; } ` export const IndexPage: FunctionComponent = ({ children }) => { return <div className={styles.parcel}>Parcel</div> } render(<IndexPage />, document.getElementById("app"));
package.json
// ... "postcss": { "modules": true, "plugins": [ "postcss-nested" ] }, "babel": { "plugins": [ [ "astroturf/plugin", { "extension": ".module.scss" }] ] }
@jquense perhaps we should add a parcel example here (if/when we fix the issue here)
Unfortunately I'm unable to get Astroturf working with Parcel and Typescript.
Without Typescript everything works fine. But with it i just get a
ReferenceError: css is not defined
execption in the browser (Parcel builds fine)PS: Thank you all for the amazing looking library.
index.tsx
package.json