@nooeh/cli 0.2.3 → 0.2.4

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.
Files changed (2) hide show
  1. package/dist/init.js +2 -3
  2. package/package.json +1 -1
package/dist/init.js CHANGED
@@ -38,7 +38,6 @@ function getStylexPlugin(stylesAlias, tokenDirectory, projectDirectory) {
38
38
  const aliasPattern = `${stylesAlias}/*`;
39
39
  const aliasTarget = `/ROOT/${tokenPath}/*`;
40
40
  return `stylex.vite({
41
- useCSSLayers: true,
42
41
  aliases: { ${JSON.stringify(aliasPattern)}: [${JSON.stringify(aliasTarget)}] },
43
42
  unstable_moduleResolution: {
44
43
  type: "commonJS",
@@ -54,11 +53,11 @@ function configureVite(source, stylesAlias, tokenDirectory, projectDirectory) {
54
53
  const legacyStylexPluginPattern = /stylex\.vite\(\{\s*useCSSLayers:\s*true\s*\}\)/;
55
54
  const emptyStylexPluginPattern = /stylex\.vite\(\)/;
56
55
  if (!source.includes("stylex.vite(") && !pluginPattern.test(source)) {
57
- throw new Error("Could not safely update the Vite plugins array. Add stylex.vite({ useCSSLayers: true }) manually.");
56
+ throw new Error("Could not safely update the Vite plugins array. Add stylex.vite() manually.");
58
57
  }
59
58
  let withStylex = source;
60
59
  if (source.includes("unstable_moduleResolution")) {
61
- withStylex = source;
60
+ withStylex = source.replace(/\s*useCSSLayers:\s*true,?/, "");
62
61
  }
63
62
  else if (legacyStylexPluginPattern.test(source)) {
64
63
  withStylex = source.replace(legacyStylexPluginPattern, stylexPlugin);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nooeh/cli",
3
- "version": "0.2.3",
3
+ "version": "0.2.4",
4
4
  "private": false,
5
5
  "bin": {
6
6
  "nooeh": "./dist/cli.js"