@homebound/truss 2.11.2 → 2.11.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/build/plugin/index.js
CHANGED
|
@@ -3390,7 +3390,7 @@ function trussEsbuildPlugin(opts) {
|
|
|
3390
3390
|
outDir = build.initialOptions.outdir ?? build.initialOptions.outdir;
|
|
3391
3391
|
build.onLoad({ filter: /\.[cm]?[jt]sx?$/ }, (args) => {
|
|
3392
3392
|
const code = readFileSync2(args.path, "utf8");
|
|
3393
|
-
if (!code.includes("Css")) return void 0;
|
|
3393
|
+
if (!code.includes("Css") && !code.includes("css=")) return void 0;
|
|
3394
3394
|
if (!mapping) {
|
|
3395
3395
|
mapping = loadMapping(resolve(process.cwd(), opts.mapping));
|
|
3396
3396
|
}
|
|
@@ -3582,7 +3582,7 @@ __injectTrussCSS(${JSON.stringify(css)});
|
|
|
3582
3582
|
const shouldBootstrapTestCss = isTest && libraryPaths.length > 0 && !isNodeModulesFile(fileId);
|
|
3583
3583
|
const testCssBootstrap = injectTestCssBootstrapImport(rewrittenCode, shouldBootstrapTestCss);
|
|
3584
3584
|
const transformedCode = testCssBootstrap.code;
|
|
3585
|
-
const hasCssDsl = rewrittenCode.includes("Css");
|
|
3585
|
+
const hasCssDsl = rewrittenCode.includes("Css") || rewrittenCode.includes("css=");
|
|
3586
3586
|
if (isNodeModulesFile(fileId)) {
|
|
3587
3587
|
return null;
|
|
3588
3588
|
}
|