unplugin-stylex 0.3.1 → 0.3.2

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.
@@ -22,6 +22,7 @@ function getOptions(options) {
22
22
  return {
23
23
  ...options,
24
24
  dev: options.dev || isDev,
25
+ invalidExts: [".json", ".html", ".jade", ".json5", ..._nullishCoalesce(options.invalidExts, () => ( []))],
25
26
  stylex: {
26
27
  filename: stylex2.filename || "stylex.css",
27
28
  stylexImports: stylex2.stylexImports || ["@stylexjs/stylex"],
@@ -97,7 +98,7 @@ var unpluginFactory = (rawOptions = {}) => {
97
98
  return {
98
99
  name: PLUGIN_NAME,
99
100
  transformInclude(id) {
100
- const invalidExts = [".json", ".html", ".jade", ".json5"];
101
+ const invalidExts = options.invalidExts;
101
102
  const extname2 = path.extname(id);
102
103
  const questionMarkIndex = extname2.indexOf("?");
103
104
  const validExtName = questionMarkIndex > -1 ? extname2.slice(0, questionMarkIndex) : extname2;
@@ -22,6 +22,7 @@ function getOptions(options) {
22
22
  return {
23
23
  ...options,
24
24
  dev: options.dev || isDev,
25
+ invalidExts: [".json", ".html", ".jade", ".json5", ...options.invalidExts ?? []],
25
26
  stylex: {
26
27
  filename: stylex2.filename || "stylex.css",
27
28
  stylexImports: stylex2.stylexImports || ["@stylexjs/stylex"],
@@ -97,7 +98,7 @@ var unpluginFactory = (rawOptions = {}) => {
97
98
  return {
98
99
  name: PLUGIN_NAME,
99
100
  transformInclude(id) {
100
- const invalidExts = [".json", ".html", ".jade", ".json5"];
101
+ const invalidExts = options.invalidExts;
101
102
  const extname2 = path.extname(id);
102
103
  const questionMarkIndex = extname2.indexOf("?");
103
104
  const validExtName = questionMarkIndex > -1 ? extname2.slice(0, questionMarkIndex) : extname2;
package/dist/esbuild.cjs CHANGED
@@ -1,11 +1,11 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
- var _chunkTCTVGJ42cjs = require('./chunk-TCTVGJ42.cjs');
3
+ var _chunk33MWAEKIcjs = require('./chunk-33MWAEKI.cjs');
4
4
  require('./chunk-ZBPRDZS4.cjs');
5
5
 
6
6
  // src/esbuild.ts
7
7
  var _unplugin = require('unplugin');
8
- var esbuildPlugin = _unplugin.createEsbuildPlugin.call(void 0, _chunkTCTVGJ42cjs.unpluginFactory);
8
+ var esbuildPlugin = _unplugin.createEsbuildPlugin.call(void 0, _chunk33MWAEKIcjs.unpluginFactory);
9
9
  var esbuild_default = esbuildPlugin;
10
10
 
11
11
 
package/dist/esbuild.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  unpluginFactory
3
- } from "./chunk-MREBYPD2.js";
3
+ } from "./chunk-QTHUNRNO.js";
4
4
  import "./chunk-6F4PWJZI.js";
5
5
 
6
6
  // src/esbuild.ts
package/dist/index.cjs CHANGED
@@ -2,10 +2,10 @@
2
2
 
3
3
 
4
4
 
5
- var _chunkTCTVGJ42cjs = require('./chunk-TCTVGJ42.cjs');
5
+ var _chunk33MWAEKIcjs = require('./chunk-33MWAEKI.cjs');
6
6
  require('./chunk-ZBPRDZS4.cjs');
7
7
 
8
8
 
9
9
 
10
10
 
11
- exports.default = _chunkTCTVGJ42cjs.src_default; exports.unplugin = _chunkTCTVGJ42cjs.unplugin; exports.unpluginFactory = _chunkTCTVGJ42cjs.unpluginFactory;
11
+ exports.default = _chunk33MWAEKIcjs.src_default; exports.unplugin = _chunk33MWAEKIcjs.unplugin; exports.unpluginFactory = _chunk33MWAEKIcjs.unpluginFactory;
package/dist/index.js CHANGED
@@ -2,7 +2,7 @@ import {
2
2
  src_default,
3
3
  unplugin,
4
4
  unpluginFactory
5
- } from "./chunk-MREBYPD2.js";
5
+ } from "./chunk-QTHUNRNO.js";
6
6
  import "./chunk-6F4PWJZI.js";
7
7
  export {
8
8
  src_default as default,
package/dist/rollup.cjs CHANGED
@@ -1,11 +1,11 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
- var _chunkTCTVGJ42cjs = require('./chunk-TCTVGJ42.cjs');
3
+ var _chunk33MWAEKIcjs = require('./chunk-33MWAEKI.cjs');
4
4
  require('./chunk-ZBPRDZS4.cjs');
5
5
 
6
6
  // src/rollup.ts
7
7
  var _unplugin = require('unplugin');
8
- var rollupPlugin = _unplugin.createRollupPlugin.call(void 0, _chunkTCTVGJ42cjs.unpluginFactory);
8
+ var rollupPlugin = _unplugin.createRollupPlugin.call(void 0, _chunk33MWAEKIcjs.unpluginFactory);
9
9
  var rollup_default = rollupPlugin;
10
10
 
11
11
 
package/dist/rollup.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  unpluginFactory
3
- } from "./chunk-MREBYPD2.js";
3
+ } from "./chunk-QTHUNRNO.js";
4
4
  import "./chunk-6F4PWJZI.js";
5
5
 
6
6
  // src/rollup.ts
package/dist/rspack.cjs CHANGED
@@ -1,11 +1,11 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
- var _chunkTCTVGJ42cjs = require('./chunk-TCTVGJ42.cjs');
3
+ var _chunk33MWAEKIcjs = require('./chunk-33MWAEKI.cjs');
4
4
  require('./chunk-ZBPRDZS4.cjs');
5
5
 
6
6
  // src/rspack.ts
7
7
  var _unplugin = require('unplugin');
8
- var rspackPlugin = _unplugin.createRspackPlugin.call(void 0, _chunkTCTVGJ42cjs.unpluginFactory);
8
+ var rspackPlugin = _unplugin.createRspackPlugin.call(void 0, _chunk33MWAEKIcjs.unpluginFactory);
9
9
  var rspack_default = rspackPlugin;
10
10
 
11
11
 
package/dist/rspack.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  unpluginFactory
3
- } from "./chunk-MREBYPD2.js";
3
+ } from "./chunk-QTHUNRNO.js";
4
4
  import "./chunk-6F4PWJZI.js";
5
5
 
6
6
  // src/rspack.ts
package/dist/types.d.cts CHANGED
@@ -9,7 +9,7 @@ type StylexOptions = {
9
9
  stylexImports?: string[];
10
10
  classNamePrefix?: string;
11
11
  unstable_moduleResolution?: {
12
- type: 'commonjs' | 'haste';
12
+ type: 'commonJS' | 'haste';
13
13
  rootDir: string;
14
14
  };
15
15
  babelConfig?: BabelConfig;
@@ -19,9 +19,8 @@ type StylexOptions = {
19
19
  runtimeInjection?: boolean;
20
20
  };
21
21
  type UnpluginStylexOptions = {
22
- compiler?: string;
22
+ invalidExts?: string[];
23
23
  dev?: boolean;
24
- enforce?: 'post' | 'pre';
25
24
  stylex?: StylexOptions;
26
25
  };
27
26
  type UnpluginStylexInstance<T> = (options?: UnpluginStylexOptions) => T;
package/dist/types.d.ts CHANGED
@@ -9,7 +9,7 @@ type StylexOptions = {
9
9
  stylexImports?: string[];
10
10
  classNamePrefix?: string;
11
11
  unstable_moduleResolution?: {
12
- type: 'commonjs' | 'haste';
12
+ type: 'commonJS' | 'haste';
13
13
  rootDir: string;
14
14
  };
15
15
  babelConfig?: BabelConfig;
@@ -19,9 +19,8 @@ type StylexOptions = {
19
19
  runtimeInjection?: boolean;
20
20
  };
21
21
  type UnpluginStylexOptions = {
22
- compiler?: string;
22
+ invalidExts?: string[];
23
23
  dev?: boolean;
24
- enforce?: 'post' | 'pre';
25
24
  stylex?: StylexOptions;
26
25
  };
27
26
  type UnpluginStylexInstance<T> = (options?: UnpluginStylexOptions) => T;
package/dist/vite.cjs CHANGED
@@ -1,11 +1,11 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
- var _chunkTCTVGJ42cjs = require('./chunk-TCTVGJ42.cjs');
3
+ var _chunk33MWAEKIcjs = require('./chunk-33MWAEKI.cjs');
4
4
  require('./chunk-ZBPRDZS4.cjs');
5
5
 
6
6
  // src/vite.ts
7
7
  var _unplugin = require('unplugin');
8
- var vitePlugin = _unplugin.createVitePlugin.call(void 0, _chunkTCTVGJ42cjs.unpluginFactory);
8
+ var vitePlugin = _unplugin.createVitePlugin.call(void 0, _chunk33MWAEKIcjs.unpluginFactory);
9
9
  var vite_default = vitePlugin;
10
10
 
11
11
 
package/dist/vite.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  unpluginFactory
3
- } from "./chunk-MREBYPD2.js";
3
+ } from "./chunk-QTHUNRNO.js";
4
4
  import "./chunk-6F4PWJZI.js";
5
5
 
6
6
  // src/vite.ts
package/dist/webpack.cjs CHANGED
@@ -1,11 +1,11 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
- var _chunkTCTVGJ42cjs = require('./chunk-TCTVGJ42.cjs');
3
+ var _chunk33MWAEKIcjs = require('./chunk-33MWAEKI.cjs');
4
4
  require('./chunk-ZBPRDZS4.cjs');
5
5
 
6
6
  // src/webpack.ts
7
7
  var _unplugin = require('unplugin');
8
- var webpackPlugin = _unplugin.createWebpackPlugin.call(void 0, _chunkTCTVGJ42cjs.unpluginFactory);
8
+ var webpackPlugin = _unplugin.createWebpackPlugin.call(void 0, _chunk33MWAEKIcjs.unpluginFactory);
9
9
  var webpack_default = webpackPlugin;
10
10
 
11
11
 
package/dist/webpack.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  unpluginFactory
3
- } from "./chunk-MREBYPD2.js";
3
+ } from "./chunk-QTHUNRNO.js";
4
4
  import "./chunk-6F4PWJZI.js";
5
5
 
6
6
  // src/webpack.ts
package/jsr.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eryue0220/unplugin-stylex",
3
- "version": "0.3.1",
3
+ "version": "0.3.2",
4
4
  "exports": {
5
5
  "./index": "./src/index.ts",
6
6
  "./esbuild": "./src/esbuild.ts",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "unplugin-stylex",
3
- "version": "0.3.1",
3
+ "version": "0.3.2",
4
4
  "packageManager": "pnpm@8.11.0",
5
5
  "description": "Unplugin for stylex",
6
6
  "repository": "https://github.com/eryue0220/unplugin-stylex",
@@ -57,16 +57,6 @@
57
57
  },
58
58
  "./*": "./*"
59
59
  },
60
- "scripts": {
61
- "dev": "tsup src/*ts --watch src",
62
- "build": "tsup src/*.ts --format cjs,esm --dts --splitting --clean",
63
- "test": "vitest",
64
- "test:update": "vitest -u",
65
- "test:cov": "vitest --coverage",
66
- "lint": "eslint . --ext .ts,.tsx,.js,.jsx",
67
- "check": "pnpm run lint && pnpm run typecheck",
68
- "typecheck": "tsc -p tsconfig.json --noEmit"
69
- },
70
60
  "engines": {
71
61
  "node": ">=16.14.0"
72
62
  },
@@ -94,5 +84,15 @@
94
84
  "typescript": "^5.4.5",
95
85
  "vite": "^5.2.11",
96
86
  "vitest": "^1.6.0"
87
+ },
88
+ "scripts": {
89
+ "dev": "tsup src/*ts --watch src",
90
+ "build": "tsup src/*.ts --format cjs,esm --dts --splitting --clean",
91
+ "test": "vitest",
92
+ "test:update": "vitest -u",
93
+ "test:cov": "vitest --coverage",
94
+ "lint": "eslint . --ext .ts,.tsx,.js,.jsx",
95
+ "check": "pnpm run lint && pnpm run typecheck",
96
+ "typecheck": "tsc -p tsconfig.json --noEmit"
97
97
  }
98
- }
98
+ }