@jk2908/cxx 0.1.5-canary.5 → 0.1.6

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/package.json CHANGED
@@ -1,89 +1,89 @@
1
- {
2
- "name": "@jk2908/cxx",
3
- "version": "0.1.5-canary.5",
4
- "type": "module",
5
- "author": "Jerome Kenway",
6
- "repository": {
7
- "type": "git",
8
- "url": "git+https://github.com/jk2908/cxx.git"
9
- },
10
- "main": "./dist/index.js",
11
- "types": "./dist/index.d.ts",
12
- "scripts": {
13
- "build": "bunchee"
14
- },
15
- "devDependencies": {
16
- "@biomejs/biome": "^1.8.3",
17
- "@types/react": "latest",
18
- "@types/react-dom": "latest",
19
- "@types/webpack": "^5.28.5",
20
- "bunchee": "^5.3.2",
21
- "cross-env": "^7.0.3",
22
- "lightningcss": "^1.27.0",
23
- "next": "^15.0.0-canary.128",
24
- "react": "^19.0.0-rc || ^19.0.0-beta || ^19.0.0",
25
- "react-dom": "^19.0.0-rc || ^19.0.0-beta || ^19.0.0",
26
- "typescript": "^5.5.4",
27
- "vite": "^5.4.2"
28
- },
29
- "peerDependencies": {
30
- "lightningcss": "^1.27.0",
31
- "next": "^15.0.0-canary || ^15.0.0",
32
- "react": "^19.0.0-rc || ^19.0.0-beta || ^19.0.0",
33
- "react-dom": "^19.0.0-rc || ^19.0.0-beta || ^19.0.0",
34
- "vite": "^4.0.0"
35
- },
36
- "exports": {
37
- ".": {
38
- "types": "./dist/index.d.ts",
39
- "default": "./dist/index.js"
40
- },
41
- "./inject": {
42
- "types": "./dist/inject/index.d.ts",
43
- "require": "./dist/inject/index.cjs",
44
- "default": "./dist/inject/index.js"
45
- },
46
- "./next": {
47
- "types": "./dist/next/index.d.ts",
48
- "default": "./dist/next/index.js"
49
- },
50
- "./next/cxx-loader": {
51
- "types": "./dist/next/cxx-loader.d.ts",
52
- "require": "./dist/next/cxx-loader.cjs",
53
- "default": "./dist/next/cxx-loader.js"
54
- },
55
- "./vite-plugin-cxx": {
56
- "types": "./dist/vite-plugin-cxx/index.d.ts",
57
- "default": "./dist/vite-plugin-cxx/index.js"
58
- }
59
- },
60
- "bugs": {
61
- "url": "https://github.com/jk2908/cxx/issues"
62
- },
63
- "description": "Utilities for generating styles in React 19",
64
- "files": [
65
- "dist",
66
- "src"
67
- ],
68
- "homepage": "https://github.com/jk2908/cxx#readme",
69
- "keywords": [
70
- "react",
71
- "react19",
72
- "css",
73
- "css-in-js",
74
- "vite-plugin",
75
- "webpack-loader",
76
- "lightningcss",
77
- "next",
78
- "vite"
79
- ],
80
- "license": "MIT",
81
- "peerDependenciesMeta": {
82
- "next": {
83
- "optional": true
84
- },
85
- "vite": {
86
- "optional": true
87
- }
88
- }
89
- }
1
+ {
2
+ "name": "@jk2908/cxx",
3
+ "version": "0.1.6",
4
+ "type": "module",
5
+ "author": "Jerome Kenway",
6
+ "repository": {
7
+ "type": "git",
8
+ "url": "git+https://github.com/jk2908/cxx.git"
9
+ },
10
+ "main": "./dist/index.js",
11
+ "types": "./dist/index.d.ts",
12
+ "scripts": {
13
+ "build": "bunchee"
14
+ },
15
+ "devDependencies": {
16
+ "@biomejs/biome": "^1.8.3",
17
+ "@types/react": "latest",
18
+ "@types/react-dom": "latest",
19
+ "@types/webpack": "^5.28.5",
20
+ "bunchee": "^5.3.2",
21
+ "cross-env": "^7.0.3",
22
+ "lightningcss": "^1.27.0",
23
+ "next": "^15.0.0-canary.128",
24
+ "react": "^19.0.0-rc || ^19.0.0-beta || ^19.0.0",
25
+ "react-dom": "^19.0.0-rc || ^19.0.0-beta || ^19.0.0",
26
+ "typescript": "^5.5.4",
27
+ "vite": "^5.4.2"
28
+ },
29
+ "peerDependencies": {
30
+ "lightningcss": "^1.27.0",
31
+ "next": "^15.0.0-canary || ^15.0.0",
32
+ "react": "^19.0.0-rc || ^19.0.0-beta || ^19.0.0",
33
+ "react-dom": "^19.0.0-rc || ^19.0.0-beta || ^19.0.0",
34
+ "vite": "^4.0.0"
35
+ },
36
+ "exports": {
37
+ ".": {
38
+ "types": "./dist/index.d.ts",
39
+ "default": "./dist/index.js"
40
+ },
41
+ "./inject": {
42
+ "types": "./dist/inject/index.d.ts",
43
+ "require": "./dist/inject/index.cjs",
44
+ "default": "./dist/inject/index.js"
45
+ },
46
+ "./next": {
47
+ "types": "./dist/next/index.d.ts",
48
+ "default": "./dist/next/index.js"
49
+ },
50
+ "./next/cxx-loader": {
51
+ "types": "./dist/next/cxx-loader.d.ts",
52
+ "require": "./dist/next/cxx-loader.cjs",
53
+ "default": "./dist/next/cxx-loader.js"
54
+ },
55
+ "./vite-plugin-cxx": {
56
+ "types": "./dist/vite-plugin-cxx/index.d.ts",
57
+ "default": "./dist/vite-plugin-cxx/index.js"
58
+ }
59
+ },
60
+ "bugs": {
61
+ "url": "https://github.com/jk2908/cxx/issues"
62
+ },
63
+ "description": "Utilities for generating styles in React 19",
64
+ "files": [
65
+ "dist",
66
+ "src"
67
+ ],
68
+ "homepage": "https://github.com/jk2908/cxx#readme",
69
+ "keywords": [
70
+ "react",
71
+ "react19",
72
+ "css",
73
+ "css-in-js",
74
+ "vite-plugin",
75
+ "webpack-loader",
76
+ "lightningcss",
77
+ "next",
78
+ "vite"
79
+ ],
80
+ "license": "MIT",
81
+ "peerDependenciesMeta": {
82
+ "next": {
83
+ "optional": true
84
+ },
85
+ "vite": {
86
+ "optional": true
87
+ }
88
+ }
89
+ }
package/src/inject.ts CHANGED
@@ -29,7 +29,7 @@ export function inject<C extends CustomAtRules = CustomAtRules>(
29
29
  ...DEFAULT_CONFIG.lightningcss,
30
30
  ...config.lightningcss,
31
31
  filename: id,
32
- code: Buffer.from(css),
32
+ code: new TextEncoder().encode(css),
33
33
  })
34
34
 
35
35
  const href = cyrb53([...Object.keys(exports ?? {}), id].join(''))
package/src/next/index.ts CHANGED
@@ -18,7 +18,7 @@ export function withCxx(nextConfig: NextConfig = {}, config: Config = {}) {
18
18
  const turboConfig = {
19
19
  ...nextConfig.turbo,
20
20
  rules: {
21
- ...(nextConfig.turbo?.rules ?? {}),
21
+ ...nextConfig.turbo?.rules,
22
22
  [TURBO_GLOB]: {
23
23
  loaders: [
24
24
  ...(nextConfig.turbo?.rules?.[TURBO_GLOB]?.loaders ?? []),