@stylexswc/rollup-plugin 0.17.1 → 0.18.0-rc.1
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/index.d.ts.map +1 -1
- package/dist/index.js +12 -5
- package/package.json +2 -2
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AACpE,OAAO,KAAK,EAAE,MAAM,EAA2C,MAAM,QAAQ,CAAC;AAM9E,OAAO,KAAK,EAAE,aAAa,EAAsB,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAU/F,MAAM,MAAM,aAAa,GAAG;IAC1B,SAAS,CAAC,EAAE,aAAa,CAAC;IAC1B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,YAAY,CAAC,EAAE,aAAa,CAAC;IAC7B,mBAAmB,CAAC,EAAE,IAAI,CAAC,gBAAgB,CAAC,aAAa,CAAC,EAAE,MAAM,GAAG,UAAU,GAAG,SAAS,CAAC,CAAC;IAC7F,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB,CAAC;AAEF,MAAM,CAAC,OAAO,UAAU,YAAY,CAAC,EACnC,SAAc,EACd,QAAuB,EACvB,YAAoB,EACpB,mBAAmB,EACnB,UAAiB,GAClB,GAAE,aAAkB,GAAG,MAAM,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AACpE,OAAO,KAAK,EAAE,MAAM,EAA2C,MAAM,QAAQ,CAAC;AAM9E,OAAO,KAAK,EAAE,aAAa,EAAsB,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAU/F,MAAM,MAAM,aAAa,GAAG;IAC1B,SAAS,CAAC,EAAE,aAAa,CAAC;IAC1B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,YAAY,CAAC,EAAE,aAAa,CAAC;IAC7B,mBAAmB,CAAC,EAAE,IAAI,CAAC,gBAAgB,CAAC,aAAa,CAAC,EAAE,MAAM,GAAG,UAAU,GAAG,SAAS,CAAC,CAAC;IAC7F,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB,CAAC;AAEF,MAAM,CAAC,OAAO,UAAU,YAAY,CAAC,EACnC,SAAc,EACd,QAAuB,EACvB,YAAoB,EACpB,mBAAmB,EACnB,UAAiB,GAClB,GAAE,aAAkB,GAAG,MAAM,CAuI7B"}
|
package/dist/index.js
CHANGED
|
@@ -72,11 +72,18 @@ function stylexPlugin({ rsOptions = {}, fileName = 'stylex.css', useCSSLayers =
|
|
|
72
72
|
return null;
|
|
73
73
|
}
|
|
74
74
|
// The combined map of all previous plugins lets the compiler resolve
|
|
75
|
-
// debug source-map annotations to the original authored file
|
|
76
|
-
//
|
|
77
|
-
//
|
|
78
|
-
// the
|
|
79
|
-
|
|
75
|
+
// debug source-map annotations to the original authored file. The
|
|
76
|
+
// compiler only reads it for those annotations (`debug` +
|
|
77
|
+
// `enableDebugDataProp`); plain map chaining is handled by Rollup
|
|
78
|
+
// itself when the plugin returns its own map. Fetching it
|
|
79
|
+
// unconditionally is expensive: with no previous maps Rollup
|
|
80
|
+
// synthesizes a hi-res map of the whole module, which then gets
|
|
81
|
+
// stringified, re-parsed and cloned per module. Rollup resets the
|
|
82
|
+
// sourcemap chain when `getCombinedSourcemap` is used, so returning
|
|
83
|
+
// the chained map is the expected contract.
|
|
84
|
+
const needsInputSourceMap = (normalizedRsOptions.debug ?? normalizedRsOptions.dev) === true &&
|
|
85
|
+
normalizedRsOptions.enableDebugDataProp !== false;
|
|
86
|
+
if (needsInputSourceMap && normalizedRsOptions.inputSourceMap === undefined) {
|
|
80
87
|
try {
|
|
81
88
|
const combinedMap = this.getCombinedSourcemap();
|
|
82
89
|
if (combinedMap?.mappings) {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stylexswc/rollup-plugin",
|
|
3
3
|
"description": "StyleX plugin for Rollup powered by a Rust NAPI-RS/SWC compiler. Fast StyleX transforms and CSS extraction without Babel.",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.18.0-rc.1",
|
|
5
5
|
"private": false,
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"sideEffects": false,
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
},
|
|
20
20
|
"dependencies": {
|
|
21
21
|
"@stylexjs/babel-plugin": "^0.19.0",
|
|
22
|
-
"@stylexswc/rs-compiler": "0.
|
|
22
|
+
"@stylexswc/rs-compiler": "0.18.0-rc.1",
|
|
23
23
|
"lightningcss": "^1.32.0"
|
|
24
24
|
},
|
|
25
25
|
"devDependencies": {
|