Skip to content

Commit

Permalink
Improve compilation to not insert inject calls
Browse files Browse the repository at this point in the history
  • Loading branch information
nmn committed Nov 29, 2023
1 parent 08789a7 commit e064ad2
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 13 deletions.
16 changes: 3 additions & 13 deletions apps/docs/components/playground-utils/files.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ module.exports = {
[
"@stylexjs/babel-plugin",
{
dev: true,
dev: false,
stylexSheetName: "<>",
genConditionalClasses: true,
unstable_moduleResolution: {
Expand Down Expand Up @@ -64,8 +64,8 @@ module.exports = {
import * as React from 'react';
import * as stylex from "@stylexjs/stylex";
export default function Card({ onClick, children, theme, variant, em = false }) {
const props = stylex.props(theme, styles.base, em && styles.emphasise, variantStyles[variant]);
export default function Card({ onClick, children, em = false }) {
const props = stylex.props(styles.base, em && styles.emphasise);
}
const styles = stylex.create({
Expand All @@ -82,16 +82,6 @@ const styles = stylex.create({
transform: "scale(1.1)",
}
});
const variantStyles = stylex.create({
danger: {
backgroundColor: "red",
color: "white",
},
primary: {
fontWeight: "bold",
},
});
`,
},
},
Expand Down
17 changes: 17 additions & 0 deletions apps/docs/vercel.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"headers": [
{
"source": "/(.*)",
"headers": [
{
"key": "Cross-Origin-Embedder-Policy",
"value": "require-corp"
},
{
"key": "Cross-Origin-Opener-Policy",
"value": "same-origin"
}
]
}
]
}

0 comments on commit e064ad2

Please sign in to comment.