@stylexswc/nextjs-plugin 0.7.0-rc.1 → 0.7.0-rc.3

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 CHANGED
@@ -85,7 +85,8 @@ npm install --save-dev @stylexswc/nextjs-plugin
85
85
 
86
86
  #### `transformCss`
87
87
 
88
- - Type: `(css: string, filePath: string | undefined) => string | Buffer | Promise<string | Buffer>`
88
+ - Type:
89
+ `(css: string, filePath: string | undefined) => string | Buffer | Promise<string | Buffer>`
89
90
  - Optional
90
91
  - Description: Custom CSS transformation function. Since the plugin injects CSS
91
92
  after all loaders, use this to apply PostCSS or other CSS transformations.
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,UAAU,EAAwB,MAAM,gCAAgC,CAAC;AACvF,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAqFpE,QAAA,MAAM,UAAU,mBACG,kBAAkB,mBACtB,UAAU,KAAQ,UAsJ9B,CAAC;AAEJ,eAAe,UAAU,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,UAAU,EAAwB,MAAM,gCAAgC,CAAC;AACvF,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAuFpE,QAAA,MAAM,UAAU,GACb,gBAAgB,kBAAkB,MAClC,aAAY,UAAe,KAAG,UAsJ9B,CAAC;AAEJ,eAAe,UAAU,CAAC"}
package/dist/index.js CHANGED
@@ -15,13 +15,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
15
15
  }) : function(o, v) {
16
16
  o["default"] = v;
17
17
  });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
24
- };
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
25
35
  var __importDefault = (this && this.__importDefault) || function (mod) {
26
36
  return (mod && mod.__esModule) ? mod : { "default": mod };
27
37
  };
@@ -59,6 +69,7 @@ const getNextMiniCssExtractPlugin = (isDev) => {
59
69
  }
60
70
  catch {
61
71
  (0, log_1.warn)('Next.js built-in mini-css-extract-plugin is broken, will fallback to "mini-css-extract-plugin"');
72
+ // eslint-disable-next-line @typescript-eslint/no-require-imports
62
73
  return require('mini-css-extract-plugin');
63
74
  }
64
75
  }
@@ -75,6 +86,7 @@ function getStyleXVirtualCssLoader(ctx, MiniCssExtractPlugin, postcss) {
75
86
  // https://github.com/vercel/next.js/blob/56d35ede8ed2ab25fa8e29583d4e81e3e76a0e29/packages/next/src/build/webpack/config/blocks/css/loaders/global.ts#L18
76
87
  // https://github.com/vercel/next.js/blob/56d35ede8ed2ab25fa8e29583d4e81e3e76a0e29/packages/next/src/build/webpack/config/blocks/css/loaders/client.ts#L3
77
88
  loaders.push({
89
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
78
90
  loader: MiniCssExtractPlugin.loader,
79
91
  options: {
80
92
  publicPath: `${ctx.config.assetPrefix}/_next/`,
package/package.json CHANGED
@@ -1,31 +1,41 @@
1
1
  {
2
2
  "name": "@stylexswc/nextjs-plugin",
3
3
  "description": "StyleX NextJS plugin with NAPI-RS compiler",
4
- "version": "0.7.0-rc.1",
4
+ "version": "0.7.0-rc.3",
5
+ "private": false,
6
+ "license": "MIT",
7
+ "sideEffects": false,
8
+ "files": [
9
+ "dist"
10
+ ],
11
+ "publishConfig": {
12
+ "registry": "https://registry.npmjs.org/",
13
+ "access": "public"
14
+ },
5
15
  "config": {
6
16
  "scripty": {
7
17
  "path": "../../scripts/packages"
8
18
  }
9
19
  },
10
20
  "dependencies": {
11
- "@stylexswc/rs-compiler": "0.7.0-rc.1",
12
- "@stylexswc/webpack-plugin": "0.7.0-rc.1"
21
+ "@stylexswc/rs-compiler": "0.7.0-rc.3",
22
+ "@stylexswc/webpack-plugin": "0.7.0-rc.3"
13
23
  },
14
24
  "devDependencies": {
15
- "@babel/types": "^7.23.9",
16
- "@stylexswc/eslint-config": "0.7.0-rc.1",
17
- "@stylexswc/typescript-config": "0.7.0-rc.1",
25
+ "@babel/types": "^7.26.9",
26
+ "@stylexswc/eslint-config": "0.7.0-rc.3",
27
+ "@stylexswc/typescript-config": "0.7.0-rc.3",
18
28
  "@types/babel__core": "^7.20.5",
19
- "@types/node": "^22.5.1",
29
+ "@types/node": "^22.13.9",
20
30
  "next": "15.2.1",
21
- "postcss": "^8.4.49",
31
+ "postcss": "^8.5.3",
22
32
  "react": "^19.0.0",
23
33
  "react-dom": "^19.0.0",
24
- "webpack": "^5.94.0"
34
+ "webpack": "^5.98.0"
35
+ },
36
+ "peerDependencies": {
37
+ "next": "15.2.1"
25
38
  },
26
- "files": [
27
- "dist"
28
- ],
29
39
  "keywords": [
30
40
  "next",
31
41
  "nextjs",
@@ -33,18 +43,8 @@
33
43
  "stylex",
34
44
  "swc"
35
45
  ],
36
- "license": "MIT",
37
46
  "main": "dist/index.js",
38
- "peerDependencies": {
39
- "next": ">=14.0.0"
40
- },
41
- "private": false,
42
- "publishConfig": {
43
- "registry": "https://registry.npmjs.org/",
44
- "access": "public"
45
- },
46
47
  "repository": "https://github.com/Dwlad90/stylex-swc-plugin",
47
- "sideEffects": false,
48
48
  "scripts": {
49
49
  "build": "scripty --ts",
50
50
  "check:artifacts": "scripty",