@stylexswc/webpack-plugin 0.17.0-rc.3 → 0.17.0-rc.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/README.md +21 -16
- package/dist/constants.d.ts +5 -0
- package/dist/constants.d.ts.map +1 -1
- package/dist/constants.js +6 -1
- package/dist/index.d.ts +11 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +29 -5
- package/dist/shared.d.ts +2 -0
- package/dist/shared.d.ts.map +1 -0
- package/dist/shared.js +15 -0
- package/dist/types.d.ts +11 -0
- package/dist/types.d.ts.map +1 -1
- package/package.json +17 -4
package/README.md
CHANGED
|
@@ -144,6 +144,22 @@ module.exports = config;
|
|
|
144
144
|
|
|
145
145
|
With `loaderOrder: 'first'`, the plugin automatically preserves these imports by injecting side-effect imports.
|
|
146
146
|
|
|
147
|
+
#### `stylexPackages`
|
|
148
|
+
|
|
149
|
+
- Type: `string[]`
|
|
150
|
+
- Optional
|
|
151
|
+
- Default: `['@stylexjs/']`
|
|
152
|
+
- Description: `node_modules` is **excluded by default**, even for files that
|
|
153
|
+
reference a StyleX import. Packages that ship untransformed StyleX source
|
|
154
|
+
(e.g. component libraries) must be allowlisted here with path fragments so
|
|
155
|
+
the StyleX loader still processes them:
|
|
156
|
+
|
|
157
|
+
```javascript
|
|
158
|
+
new StylexPlugin({
|
|
159
|
+
stylexPackages: ['@stylexjs/', 'my-design-system'],
|
|
160
|
+
});
|
|
161
|
+
```
|
|
162
|
+
|
|
147
163
|
### Advanced Options
|
|
148
164
|
|
|
149
165
|
#### `transformCss`
|
|
@@ -263,29 +279,18 @@ new StylexPlugin({
|
|
|
263
279
|
})
|
|
264
280
|
```
|
|
265
281
|
|
|
266
|
-
**Exclude node_modules except specific packages:**
|
|
267
|
-
|
|
268
|
-
```javascript
|
|
269
|
-
new StylexPlugin({
|
|
270
|
-
rsOptions: {
|
|
271
|
-
// Exclude all node_modules except @stylexjs/open-props
|
|
272
|
-
exclude: [/node_modules(?!\/@stylexjs\/open-props)/],
|
|
273
|
-
},
|
|
274
|
-
})
|
|
275
|
-
```
|
|
276
|
-
|
|
277
282
|
**Transform only specific packages from node_modules:**
|
|
278
283
|
|
|
284
|
+
`node_modules` is excluded by default regardless of `rsOptions.include`/
|
|
285
|
+
`exclude` — allowlist packages with `stylexPackages` instead:
|
|
286
|
+
|
|
279
287
|
```javascript
|
|
280
288
|
new StylexPlugin({
|
|
281
289
|
rsOptions: {
|
|
282
|
-
include: [
|
|
283
|
-
'src/**/*.{ts,tsx}',
|
|
284
|
-
'node_modules/@stylexjs/open-props/**/*.js',
|
|
285
|
-
'node_modules/@my-org/design-system/**/*.js',
|
|
286
|
-
],
|
|
290
|
+
include: ['src/**/*.{ts,tsx}'],
|
|
287
291
|
exclude: ['**/*.test.*'],
|
|
288
292
|
},
|
|
293
|
+
stylexPackages: ['@stylexjs/open-props', '@my-org/design-system'],
|
|
289
294
|
})
|
|
290
295
|
```
|
|
291
296
|
|
package/dist/constants.d.ts
CHANGED
|
@@ -4,4 +4,9 @@ export declare const VIRTUAL_CSS_PATTERN: RegExp;
|
|
|
4
4
|
export declare const STYLEX_CHUNK_NAME = "_stylex-webpack-generated";
|
|
5
5
|
export declare const INCLUDE_REGEXP: RegExp;
|
|
6
6
|
export declare const IS_DEV_ENV: boolean;
|
|
7
|
+
/**
|
|
8
|
+
* node_modules packages that ship untransformed StyleX source and must go
|
|
9
|
+
* through the stylex-loader even though node_modules is excluded by default
|
|
10
|
+
*/
|
|
11
|
+
export declare const DEFAULT_STYLEX_PACKAGES: string[];
|
|
7
12
|
//# sourceMappingURL=constants.d.ts.map
|
package/dist/constants.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,WAAW,WAAW,CAAC;AACpC,eAAO,MAAM,gBAAgB,QAA0C,CAAC;AACxE,eAAO,MAAM,mBAAmB,QAAyB,CAAC;AAC1D,eAAO,MAAM,iBAAiB,8BAA8B,CAAC;AAC7D,eAAO,MAAM,cAAc,QAAoB,CAAC;AAChD,eAAO,MAAM,UAAU,SAAyC,CAAC"}
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,WAAW,WAAW,CAAC;AACpC,eAAO,MAAM,gBAAgB,QAA0C,CAAC;AACxE,eAAO,MAAM,mBAAmB,QAAyB,CAAC;AAC1D,eAAO,MAAM,iBAAiB,8BAA8B,CAAC;AAC7D,eAAO,MAAM,cAAc,QAAoB,CAAC;AAChD,eAAO,MAAM,UAAU,SAAyC,CAAC;AACjE;;;GAGG;AACH,eAAO,MAAM,uBAAuB,UAAiB,CAAC"}
|
package/dist/constants.js
CHANGED
|
@@ -1,9 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.IS_DEV_ENV = exports.INCLUDE_REGEXP = exports.STYLEX_CHUNK_NAME = exports.VIRTUAL_CSS_PATTERN = exports.VIRTUAL_CSS_PATH = exports.PLUGIN_NAME = void 0;
|
|
3
|
+
exports.DEFAULT_STYLEX_PACKAGES = exports.IS_DEV_ENV = exports.INCLUDE_REGEXP = exports.STYLEX_CHUNK_NAME = exports.VIRTUAL_CSS_PATTERN = exports.VIRTUAL_CSS_PATH = exports.PLUGIN_NAME = void 0;
|
|
4
4
|
exports.PLUGIN_NAME = 'stylex';
|
|
5
5
|
exports.VIRTUAL_CSS_PATH = require.resolve('./stylex.virtual.css');
|
|
6
6
|
exports.VIRTUAL_CSS_PATTERN = /stylex\.virtual\.css/;
|
|
7
7
|
exports.STYLEX_CHUNK_NAME = '_stylex-webpack-generated';
|
|
8
8
|
exports.INCLUDE_REGEXP = /\.[cm]?[jt]sx?$/;
|
|
9
9
|
exports.IS_DEV_ENV = process.env.NODE_ENV === 'development';
|
|
10
|
+
/**
|
|
11
|
+
* node_modules packages that ship untransformed StyleX source and must go
|
|
12
|
+
* through the stylex-loader even though node_modules is excluded by default
|
|
13
|
+
*/
|
|
14
|
+
exports.DEFAULT_STYLEX_PACKAGES = ['@stylexjs/'];
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { STYLEX_CHUNK_NAME, VIRTUAL_CSS_PATTERN } from './constants';
|
|
1
|
+
import { DEFAULT_STYLEX_PACKAGES, STYLEX_CHUNK_NAME, VIRTUAL_CSS_PATTERN } from './constants';
|
|
2
2
|
import type { TransformedOptions } from '@stylexswc/rs-compiler';
|
|
3
3
|
import type webpack from 'webpack';
|
|
4
4
|
import type { Rule as StyleXRule } from '@stylexjs/babel-plugin';
|
|
@@ -13,10 +13,18 @@ export default class StyleXPlugin {
|
|
|
13
13
|
cacheGroup?: CacheGroupOptions;
|
|
14
14
|
transformCss: CSSTransformer;
|
|
15
15
|
loaderOrder: StyleXPluginOption['loaderOrder'];
|
|
16
|
-
|
|
16
|
+
stylexPackages: string[];
|
|
17
|
+
constructor({ stylexImports, useCSSLayers, rsOptions, nextjsMode, transformCss, extractCSS, loaderOrder, cacheGroup, stylexPackages, }?: StyleXPluginOption);
|
|
18
|
+
/**
|
|
19
|
+
* Excludes node_modules by default, matching the rspack plugin, so
|
|
20
|
+
* unrelated dependencies whose source happens to mention a StyleX import
|
|
21
|
+
* string aren't parsed and transformed unless explicitly allowlisted.
|
|
22
|
+
*/
|
|
23
|
+
shouldProcessFile(resourcePath: string): boolean;
|
|
17
24
|
apply(compiler: webpack.Compiler): void;
|
|
18
25
|
}
|
|
19
|
-
export { VIRTUAL_CSS_PATTERN, STYLEX_CHUNK_NAME };
|
|
26
|
+
export { VIRTUAL_CSS_PATTERN, STYLEX_CHUNK_NAME, DEFAULT_STYLEX_PACKAGES };
|
|
27
|
+
export { isAllowlistedPackage } from './shared';
|
|
20
28
|
export { stylexLoaderPath as loader, stylexVirtualLoaderPath as virtualLoader };
|
|
21
29
|
export type { StyleXPluginOption, CacheGroupOptions } from './types';
|
|
22
30
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAEA,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,uBAAuB,EAIvB,iBAAiB,EAEjB,mBAAmB,EACpB,MAAM,aAAa,CAAC;AAIrB,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAEjE,OAAO,KAAK,OAAO,MAAM,SAAS,CAAC;AACnC,OAAO,KAAK,EAAE,IAAI,IAAI,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACjE,OAAO,KAAK,EACV,cAAc,EACd,kBAAkB,EAClB,0BAA0B,EAE1B,iBAAiB,EAClB,MAAM,SAAS,CAAC;AAoBjB,QAAA,MAAM,gBAAgB,QAAqC,CAAC;AAC5D,QAAA,MAAM,uBAAuB,QAAiD,CAAC;AAiB/E,MAAM,MAAM,mBAAmB,GAAG,CAAC,aAAa,EAAE,MAAM,EAAE,YAAY,EAAE,UAAU,EAAE,KAAK,IAAI,CAAC;AAE9F,MAAM,CAAC,OAAO,OAAO,YAAY;IAC/B,WAAW,qCAA4C;IACvD,kBAAkB,EAAE,kBAAkB,CAAC;IAEvC,YAAY,EAAE,0BAA0B,CAAC;IACzC,UAAU,CAAC,EAAE,iBAAiB,CAAC;IAC/B,YAAY,EAAE,cAAc,CAAC;IAC7B,WAAW,EAAE,kBAAkB,CAAC,aAAa,CAAC,CAAC;IAC/C,cAAc,EAAE,MAAM,EAAE,CAAC;gBACb,EACV,aAA8C,EAC9C,YAAoB,EACpB,SAAc,EACd,UAAkB,EAClB,YAAgC,EAChC,UAAiB,EACjB,WAAqB,EACrB,UAAU,EACV,cAAwC,GACzC,GAAE,kBAAuB;IA0B1B;;;;OAIG;IACH,iBAAiB,CAAC,YAAY,EAAE,MAAM,GAAG,OAAO;IAoBhD,KAAK,CAAC,QAAQ,EAAE,OAAO,CAAC,QAAQ;CAmKjC;AAED,OAAO,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,uBAAuB,EAAE,CAAC;AAC3E,OAAO,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAC;AAGhD,OAAO,EAAE,gBAAgB,IAAI,MAAM,EAAE,uBAAuB,IAAI,aAAa,EAAE,CAAC;AAEhF,YAAY,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -3,13 +3,15 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.virtualLoader = exports.loader = exports.STYLEX_CHUNK_NAME = exports.VIRTUAL_CSS_PATTERN = void 0;
|
|
6
|
+
exports.virtualLoader = exports.loader = exports.isAllowlistedPackage = exports.DEFAULT_STYLEX_PACKAGES = exports.STYLEX_CHUNK_NAME = exports.VIRTUAL_CSS_PATTERN = void 0;
|
|
7
7
|
const babel_plugin_1 = __importDefault(require("@stylexjs/babel-plugin"));
|
|
8
8
|
const path_1 = __importDefault(require("path"));
|
|
9
9
|
const constants_1 = require("./constants");
|
|
10
|
+
Object.defineProperty(exports, "DEFAULT_STYLEX_PACKAGES", { enumerable: true, get: function () { return constants_1.DEFAULT_STYLEX_PACKAGES; } });
|
|
10
11
|
Object.defineProperty(exports, "STYLEX_CHUNK_NAME", { enumerable: true, get: function () { return constants_1.STYLEX_CHUNK_NAME; } });
|
|
11
12
|
Object.defineProperty(exports, "VIRTUAL_CSS_PATTERN", { enumerable: true, get: function () { return constants_1.VIRTUAL_CSS_PATTERN; } });
|
|
12
13
|
const rs_compiler_1 = require("@stylexswc/rs-compiler");
|
|
14
|
+
const shared_1 = require("./shared");
|
|
13
15
|
function resolveLoaderPath(loaderName) {
|
|
14
16
|
try {
|
|
15
17
|
return require.resolve(`./${loaderName}`);
|
|
@@ -36,7 +38,7 @@ const getStyleXRules = (stylexRules, transformedOptions) => {
|
|
|
36
38
|
const allRules = Array.from(stylexRules.values()).flat();
|
|
37
39
|
return babel_plugin_1.default.processStylexRules(allRules, transformedOptions);
|
|
38
40
|
};
|
|
39
|
-
const
|
|
41
|
+
const identityTransform = css => css;
|
|
40
42
|
class StyleXPlugin {
|
|
41
43
|
stylexRules = new Map();
|
|
42
44
|
transformedOptions;
|
|
@@ -44,7 +46,8 @@ class StyleXPlugin {
|
|
|
44
46
|
cacheGroup;
|
|
45
47
|
transformCss;
|
|
46
48
|
loaderOrder;
|
|
47
|
-
|
|
49
|
+
stylexPackages;
|
|
50
|
+
constructor({ stylexImports = ['stylex', '@stylexjs/stylex'], useCSSLayers = false, rsOptions = {}, nextjsMode = false, transformCss = identityTransform, extractCSS = true, loaderOrder = 'first', cacheGroup, stylexPackages = constants_1.DEFAULT_STYLEX_PACKAGES, } = {}) {
|
|
48
51
|
this.transformedOptions = {
|
|
49
52
|
useLayers: useCSSLayers,
|
|
50
53
|
legacyDisableLayers: rsOptions.legacyDisableLayers,
|
|
@@ -67,6 +70,24 @@ class StyleXPlugin {
|
|
|
67
70
|
this.transformCss = transformCss;
|
|
68
71
|
this.loaderOrder = loaderOrder;
|
|
69
72
|
this.cacheGroup = cacheGroup;
|
|
73
|
+
this.stylexPackages = stylexPackages;
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* Excludes node_modules by default, matching the rspack plugin, so
|
|
77
|
+
* unrelated dependencies whose source happens to mention a StyleX import
|
|
78
|
+
* string aren't parsed and transformed unless explicitly allowlisted.
|
|
79
|
+
*/
|
|
80
|
+
shouldProcessFile(resourcePath) {
|
|
81
|
+
if (!resourcePath) {
|
|
82
|
+
return false;
|
|
83
|
+
}
|
|
84
|
+
const nodeModulesSegment = `${path_1.default.sep}node_modules${path_1.default.sep}`;
|
|
85
|
+
if (resourcePath.includes(nodeModulesSegment)) {
|
|
86
|
+
if (!(0, shared_1.isAllowlistedPackage)(resourcePath, this.stylexPackages)) {
|
|
87
|
+
return false;
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
return (0, rs_compiler_1.shouldTransformFile)(resourcePath, this.loaderOption.rsOptions?.include, this.loaderOption.rsOptions?.exclude);
|
|
70
91
|
}
|
|
71
92
|
apply(compiler) {
|
|
72
93
|
// If splitChunk is enabled, we create a dedicated chunk for stylex css
|
|
@@ -103,8 +124,8 @@ class StyleXPlugin {
|
|
|
103
124
|
NormalModule.getCompilationHooks(compilation).loader.tap(constants_1.PLUGIN_NAME, (loaderContext, mod) => {
|
|
104
125
|
const extname = path_1.default.extname(mod.matchResource || mod.resource);
|
|
105
126
|
if (constants_1.INCLUDE_REGEXP.test(extname)) {
|
|
106
|
-
// Add path filtering check
|
|
107
|
-
const shouldTransform =
|
|
127
|
+
// Add path filtering check, including the node_modules allowlist
|
|
128
|
+
const shouldTransform = this.shouldProcessFile(mod.resource);
|
|
108
129
|
if (!shouldTransform) {
|
|
109
130
|
return; // Skip adding loader if filtered out
|
|
110
131
|
}
|
|
@@ -191,6 +212,8 @@ class StyleXPlugin {
|
|
|
191
212
|
}
|
|
192
213
|
}
|
|
193
214
|
exports.default = StyleXPlugin;
|
|
215
|
+
var shared_2 = require("./shared");
|
|
216
|
+
Object.defineProperty(exports, "isAllowlistedPackage", { enumerable: true, get: function () { return shared_2.isAllowlistedPackage; } });
|
|
194
217
|
// Skipped when `module.exports` is an ES module namespace (frozen, cannot be
|
|
195
218
|
// reassigned) — the ESM exports above provide the same surface there
|
|
196
219
|
if (typeof module !== 'undefined' &&
|
|
@@ -201,4 +224,5 @@ if (typeof module !== 'undefined' &&
|
|
|
201
224
|
module.exports.virtualLoader = stylexVirtualLoaderPath;
|
|
202
225
|
module.exports.VIRTUAL_CSS_PATTERN = constants_1.VIRTUAL_CSS_PATTERN;
|
|
203
226
|
module.exports.STYLEX_CHUNK_NAME = constants_1.STYLEX_CHUNK_NAME;
|
|
227
|
+
module.exports.DEFAULT_STYLEX_PACKAGES = constants_1.DEFAULT_STYLEX_PACKAGES;
|
|
204
228
|
}
|
package/dist/shared.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shared.d.ts","sourceRoot":"","sources":["../src/shared.ts"],"names":[],"mappings":"AAEA,wBAAgB,oBAAoB,CAAC,YAAY,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,EAAE,WAYlF"}
|
package/dist/shared.js
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.isAllowlistedPackage = isAllowlistedPackage;
|
|
7
|
+
const path_1 = __importDefault(require("path"));
|
|
8
|
+
function isAllowlistedPackage(resourcePath, stylexPackages) {
|
|
9
|
+
const nodeModulesSegment = `${path_1.default.sep}node_modules${path_1.default.sep}`;
|
|
10
|
+
const nodeModulesEntries = path_1.default.normalize(resourcePath).split(nodeModulesSegment).slice(1);
|
|
11
|
+
return stylexPackages.some(packageName => {
|
|
12
|
+
const normalizedPackageName = path_1.default.normalize(packageName).replace(/[\\/]$/, '');
|
|
13
|
+
return nodeModulesEntries.some(entry => entry === normalizedPackageName || entry.startsWith(`${normalizedPackageName}${path_1.default.sep}`));
|
|
14
|
+
});
|
|
15
|
+
}
|
package/dist/types.d.ts
CHANGED
|
@@ -65,6 +65,17 @@ export interface StyleXPluginOption {
|
|
|
65
65
|
* @see https://webpack.js.org/plugins/split-chunks-plugin/#splitchunkscachegroups
|
|
66
66
|
*/
|
|
67
67
|
cacheGroup?: CacheGroupOptions;
|
|
68
|
+
/**
|
|
69
|
+
* node_modules packages that must be processed by the stylex-loader.
|
|
70
|
+
*
|
|
71
|
+
* By default, node_modules is excluded even if a module imports StyleX, so
|
|
72
|
+
* only source that ships already-untransformed StyleX (e.g. component
|
|
73
|
+
* libraries) needs to opt in here. List path fragments (e.g. '@stylexjs/',
|
|
74
|
+
* 'my-design-system') for packages that ship untransformed StyleX source.
|
|
75
|
+
*
|
|
76
|
+
* @default ['@stylexjs/']
|
|
77
|
+
*/
|
|
78
|
+
stylexPackages?: string[];
|
|
68
79
|
}
|
|
69
80
|
export type StyleXWebpackLoaderOptions = {
|
|
70
81
|
stylexImports: StyleXOptions['importSources'];
|
package/dist/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAC3E,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAC7C,OAAO,KAAK,OAAO,MAAM,SAAS,CAAC;AACnC,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,GAAG,CAAC;AAE7C,MAAM,MAAM,iBAAiB,GAAG,WAAW,CACzC,OAAO,CACL,OAAO,CAAC,OAAO,CAAC,aAAa,CAAC,cAAc,CAAC,EAAE,SAAS,CAAC,CAAC,aAAa,CAAC,EACxE,SAAS,GAAG,KAAK,CAClB,CAAC,aAAa,CAAC,CACjB,CAAC,MAAM,CAAC,CAAC;AAEV,KAAK,aAAa,GAAG,UAAU,CAAC,UAAU,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;AAE7E,MAAM,MAAM,SAAS,GAAG,aAAa,CAAC,GAAG,CAAC,CAAC;AAC3C,MAAM,MAAM,SAAS,GAAG,aAAa,CAAC,GAAG,CAAC,CAA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AuB,EAAE;QACvB,mBAAmB,EAAE,mBAAmB,CAAC;KAC1C,CAAC;CACH,CAAC;AAEF,MAAM,MAAM,aAAa,GAAG;IAC1B,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,GAAG,CAAC,EAAE,IAAI,GAAG,MAAM,CAAA;KAAE,CAAC;IAC5C,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stylexswc/webpack-plugin",
|
|
3
3
|
"description": "StyleX webpack plugin with NAPI-RS compiler",
|
|
4
|
-
"version": "0.17.0-rc.
|
|
4
|
+
"version": "0.17.0-rc.4",
|
|
5
5
|
"config": {
|
|
6
6
|
"scripty": {
|
|
7
7
|
"path": "../../scripts/packages"
|
|
@@ -9,18 +9,31 @@
|
|
|
9
9
|
},
|
|
10
10
|
"dependencies": {
|
|
11
11
|
"@stylexjs/babel-plugin": "^0.19.0",
|
|
12
|
-
"@stylexswc/rs-compiler": "0.17.0-rc.
|
|
12
|
+
"@stylexswc/rs-compiler": "0.17.0-rc.4",
|
|
13
13
|
"loader-utils": "^3.3.1"
|
|
14
14
|
},
|
|
15
15
|
"devDependencies": {
|
|
16
|
-
"@stylexswc/eslint-config": "0.17.0-rc.
|
|
17
|
-
"@stylexswc/typescript-config": "0.17.0-rc.
|
|
16
|
+
"@stylexswc/eslint-config": "0.17.0-rc.4",
|
|
17
|
+
"@stylexswc/typescript-config": "0.17.0-rc.4",
|
|
18
18
|
"@types/loader-utils": "^3.0.0",
|
|
19
19
|
"@types/node": "^26.1.0",
|
|
20
20
|
"mini-css-extract-plugin": "^2.10.2",
|
|
21
21
|
"vitest": "^4.1.9",
|
|
22
22
|
"webpack": "^5.108.3"
|
|
23
23
|
},
|
|
24
|
+
"exports": {
|
|
25
|
+
".": {
|
|
26
|
+
"types": "./dist/index.d.ts",
|
|
27
|
+
"import": "./dist/index.js",
|
|
28
|
+
"require": "./dist/index.js"
|
|
29
|
+
},
|
|
30
|
+
"./shared": {
|
|
31
|
+
"types": "./dist/shared.d.ts",
|
|
32
|
+
"import": "./dist/shared.js",
|
|
33
|
+
"require": "./dist/shared.js"
|
|
34
|
+
},
|
|
35
|
+
"./package.json": "./package.json"
|
|
36
|
+
},
|
|
24
37
|
"files": [
|
|
25
38
|
"dist"
|
|
26
39
|
],
|