@astryxdesign/build 0.1.4-canary.ff77e1c → 0.1.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.
- package/dist/vite.mjs +3 -3
- package/package.json +2 -2
- package/src/vite.ts +3 -3
package/dist/vite.mjs
CHANGED
|
@@ -9,8 +9,8 @@ var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require
|
|
|
9
9
|
// src/vite.ts
|
|
10
10
|
import stylexBabelPlugin from "@stylexjs/babel-plugin";
|
|
11
11
|
import stylex from "@stylexjs/unplugin";
|
|
12
|
-
import path from "
|
|
13
|
-
import { fileURLToPath } from "
|
|
12
|
+
import path from "path";
|
|
13
|
+
import { fileURLToPath } from "url";
|
|
14
14
|
var __dirname = path.dirname(fileURLToPath(import.meta.url));
|
|
15
15
|
var LIBRARY_PATTERN = "node_modules/@astryxdesign/";
|
|
16
16
|
var STYLEX_CSS_PATH = "/virtual:stylex.css";
|
|
@@ -82,7 +82,7 @@ function astryxStylex(options = {}) {
|
|
|
82
82
|
config() {
|
|
83
83
|
let xdsPackages = ["@astryxdesign/core"];
|
|
84
84
|
try {
|
|
85
|
-
const fs = __require("
|
|
85
|
+
const fs = __require("fs");
|
|
86
86
|
const xdsDir = path.resolve(rootDir, "node_modules/@astryxdesign");
|
|
87
87
|
if (fs.existsSync(xdsDir)) {
|
|
88
88
|
xdsPackages = fs.readdirSync(xdsDir).filter((name) => !name.startsWith(".")).map((name) => `@astryxdesign/${name}`);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@astryxdesign/build",
|
|
3
|
-
"version": "0.1.4
|
|
3
|
+
"version": "0.1.4",
|
|
4
4
|
"description": "Build plugins for XDS source builds — babel, PostCSS, and Vite integrations",
|
|
5
5
|
"author": "Meta Open Source",
|
|
6
6
|
"license": "MIT",
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"@stylexjs/babel-plugin": ">=0.18.0",
|
|
40
40
|
"@babel/core": ">=7.0.0",
|
|
41
41
|
"@stylexjs/unplugin": ">=0.18.0",
|
|
42
|
-
"vite": "
|
|
42
|
+
"vite": ">=5.0.0"
|
|
43
43
|
},
|
|
44
44
|
"dependencies": {
|
|
45
45
|
"fast-glob": "^3.3.0",
|
package/src/vite.ts
CHANGED
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
import type {Plugin, UserConfig} from 'vite';
|
|
4
4
|
import stylexBabelPlugin from '@stylexjs/babel-plugin';
|
|
5
5
|
import stylex from '@stylexjs/unplugin';
|
|
6
|
-
import path from '
|
|
7
|
-
import {fileURLToPath} from '
|
|
6
|
+
import path from 'path';
|
|
7
|
+
import {fileURLToPath} from 'url';
|
|
8
8
|
|
|
9
9
|
const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
|
10
10
|
|
|
@@ -189,7 +189,7 @@ export function astryxStylex(
|
|
|
189
189
|
// strips stylex.create/defineVars calls and causes runtime errors.
|
|
190
190
|
let xdsPackages: string[] = ['@astryxdesign/core'];
|
|
191
191
|
try {
|
|
192
|
-
const fs = require('
|
|
192
|
+
const fs = require('fs');
|
|
193
193
|
const xdsDir = path.resolve(rootDir, 'node_modules/@astryxdesign');
|
|
194
194
|
if (fs.existsSync(xdsDir)) {
|
|
195
195
|
xdsPackages = fs
|