@stylexjs/rollup-plugin 0.14.2 → 0.15.0

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/lib/es/index.mjs CHANGED
@@ -16,23 +16,22 @@ function replaceFileName(original, css) {
16
16
  const hash = crypto.createHash('sha256').update(css).digest('hex').slice(0, 8);
17
17
  return original.replace(/\[hash\]/g, hash);
18
18
  }
19
- export default function stylexPlugin() {
20
- let {
21
- dev = IS_DEV_ENV,
22
- unstable_moduleResolution = {
23
- type: 'commonJS',
24
- rootDir: process.cwd()
25
- },
26
- fileName = 'stylex.css',
27
- babelConfig: {
28
- plugins = [],
29
- presets = []
30
- } = {},
31
- importSources = ['stylex', '@stylexjs/stylex'],
32
- useCSSLayers = false,
33
- lightningcssOptions,
34
- ...options
35
- } = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
19
+ export default function stylexPlugin({
20
+ dev = IS_DEV_ENV,
21
+ unstable_moduleResolution = {
22
+ type: 'commonJS',
23
+ rootDir: process.cwd()
24
+ },
25
+ fileName = 'stylex.css',
26
+ babelConfig: {
27
+ plugins = [],
28
+ presets = []
29
+ } = {},
30
+ importSources = ['stylex', '@stylexjs/stylex'],
31
+ useCSSLayers = false,
32
+ lightningcssOptions,
33
+ ...options
34
+ } = {}) {
36
35
  let stylexRules = {};
37
36
  return {
38
37
  name: 'rollup-plugin-stylex',
@@ -59,12 +58,11 @@ export default function stylexPlugin() {
59
58
  });
60
59
  }
61
60
  },
62
- shouldTransformCachedModule(_ref) {
63
- let {
64
- code: _code,
65
- id,
66
- meta
67
- } = _ref;
61
+ shouldTransformCachedModule({
62
+ code: _code,
63
+ id,
64
+ meta
65
+ }) {
68
66
  stylexRules[id] = meta.stylex;
69
67
  return false;
70
68
  },
package/lib/index.js CHANGED
@@ -22,23 +22,22 @@ function replaceFileName(original, css) {
22
22
  const hash = _crypto.default.createHash('sha256').update(css).digest('hex').slice(0, 8);
23
23
  return original.replace(/\[hash\]/g, hash);
24
24
  }
25
- function stylexPlugin() {
26
- let {
27
- dev = IS_DEV_ENV,
28
- unstable_moduleResolution = {
29
- type: 'commonJS',
30
- rootDir: process.cwd()
31
- },
32
- fileName = 'stylex.css',
33
- babelConfig: {
34
- plugins = [],
35
- presets = []
36
- } = {},
37
- importSources = ['stylex', '@stylexjs/stylex'],
38
- useCSSLayers = false,
39
- lightningcssOptions,
40
- ...options
41
- } = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
25
+ function stylexPlugin({
26
+ dev = IS_DEV_ENV,
27
+ unstable_moduleResolution = {
28
+ type: 'commonJS',
29
+ rootDir: process.cwd()
30
+ },
31
+ fileName = 'stylex.css',
32
+ babelConfig: {
33
+ plugins = [],
34
+ presets = []
35
+ } = {},
36
+ importSources = ['stylex', '@stylexjs/stylex'],
37
+ useCSSLayers = false,
38
+ lightningcssOptions,
39
+ ...options
40
+ } = {}) {
42
41
  let stylexRules = {};
43
42
  return {
44
43
  name: 'rollup-plugin-stylex',
@@ -65,12 +64,11 @@ function stylexPlugin() {
65
64
  });
66
65
  }
67
66
  },
68
- shouldTransformCachedModule(_ref) {
69
- let {
70
- code: _code,
71
- id,
72
- meta
73
- } = _ref;
67
+ shouldTransformCachedModule({
68
+ code: _code,
69
+ id,
70
+ meta
71
+ }) {
74
72
  stylexRules[id] = meta.stylex;
75
73
  return false;
76
74
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stylexjs/rollup-plugin",
3
- "version": "0.14.2",
3
+ "version": "0.15.0",
4
4
  "description": "Rollup plugin for StyleX",
5
5
  "main": "./lib/index.js",
6
6
  "module": "./lib/es/index.mjs",
@@ -35,7 +35,7 @@
35
35
  "@babel/plugin-syntax-flow": "^7.26.0",
36
36
  "@babel/plugin-syntax-jsx": "^7.25.9",
37
37
  "@babel/plugin-syntax-typescript": "^7.25.9",
38
- "@stylexjs/babel-plugin": "0.14.2",
38
+ "@stylexjs/babel-plugin": "0.15.0",
39
39
  "lightningcss": "^1.29.1"
40
40
  },
41
41
  "devDependencies": {