Bump
This commit is contained in:
@ -39,3 +39,14 @@ exports[`babel-tailwind > supports grouped tw 2`] = `
|
||||
font-weight: 600;
|
||||
}"
|
||||
`;
|
||||
|
||||
exports[`babel-tailwind > supports styled components usage 1`] = `
|
||||
"import { classed as _classed } from "@aet/tailwind/classed";
|
||||
var Div = _classed("div", "tw-gqn2k6");"
|
||||
`;
|
||||
|
||||
exports[`babel-tailwind > supports styled components usage 2`] = `
|
||||
".tw-gqn2k6 {
|
||||
text-align: center;
|
||||
}"
|
||||
`;
|
||||
|
@ -40,4 +40,20 @@ describe("babel-tailwind", () => {
|
||||
|
||||
matchSnapshot(files);
|
||||
});
|
||||
|
||||
it("supports styled components usage", async () => {
|
||||
const { files } = await compileESBuild({
|
||||
clsx: "emotion",
|
||||
expectFiles: 2,
|
||||
javascript: `
|
||||
import {tw} from "@aet/tailwind/macro";
|
||||
|
||||
const Div = tw.div\`
|
||||
text-center
|
||||
\`;
|
||||
`,
|
||||
});
|
||||
|
||||
matchSnapshot(files);
|
||||
});
|
||||
});
|
||||
|
@ -47,7 +47,14 @@ export function getBuild(name: string) {
|
||||
const result = await esbuild.build({
|
||||
bundle: true,
|
||||
write: false,
|
||||
external: ["react/jsx-runtime", "@emotion/css", "clsx", "tslib"],
|
||||
external: [
|
||||
"react",
|
||||
"react/jsx-runtime",
|
||||
"@emotion/css",
|
||||
"clsx",
|
||||
"tslib",
|
||||
"@aet/tailwind/classed",
|
||||
],
|
||||
outdir: "dist",
|
||||
format: "esm",
|
||||
entryPoints: [await write("index.tsx", dedent(javascript))],
|
||||
|
Reference in New Issue
Block a user