@jk2908/cxx 0.1.4 → 0.1.5-canary

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.
@@ -9,6 +9,14 @@ import { Config } from '../inject/index.js';
9
9
 
10
10
  declare function withCxx(nextConfig?: NextConfig, config?: Config): {
11
11
  webpack(conf: Configuration, options: WebpackConfigContext): any;
12
+ turbo: {
13
+ rules: {
14
+ './app/**/*.tsx': {
15
+ loaders: string[];
16
+ as: string;
17
+ };
18
+ };
19
+ };
12
20
  exportPathMap?: (defaultMap: next_dist_server_config_shared.ExportPathMap, ctx: {
13
21
  dev: boolean;
14
22
  dir: string;
@@ -1,8 +1,8 @@
1
- import __node_cjsPath from 'node:path';
1
+ import path from 'node:path';
2
2
  import __node_cjsUrl from 'node:url';
3
3
 
4
4
  const __filename = __node_cjsUrl.fileURLToPath(import.meta.url);
5
- const __dirname = __node_cjsPath.dirname(__filename);
5
+ const __dirname = path.dirname(__filename);
6
6
 
7
7
  function withCxx(nextConfig = {}, config) {
8
8
  return {
@@ -13,13 +13,23 @@ function withCxx(nextConfig = {}, config) {
13
13
  test: /\.(js|jsx|ts|tsx)$/,
14
14
  exclude: /node_modules/,
15
15
  use: {
16
- loader: __node_cjsPath.resolve(__dirname, 'cxx-loader.js'),
16
+ loader: path.resolve(__dirname, 'cxx-loader.js'),
17
17
  options: {
18
18
  ...config
19
19
  }
20
20
  }
21
21
  });
22
22
  return resolvedNextConfig;
23
+ },
24
+ turbo: {
25
+ rules: {
26
+ './app/**/*.tsx': {
27
+ loaders: [
28
+ path.resolve(__dirname, 'cxx-loader.js')
29
+ ],
30
+ as: './tsx'
31
+ }
32
+ }
23
33
  }
24
34
  };
25
35
  }
package/package.json CHANGED
@@ -1,87 +1,87 @@
1
- {
2
- "name": "@jk2908/cxx",
3
- "version": "0.1.4",
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
- "default": "./dist/inject/index.js"
44
- },
45
- "./next": {
46
- "types": "./dist/next/index.d.ts",
47
- "default": "./dist/next/index.js"
48
- },
49
- "./next/cxx-loader": {
50
- "types": "./dist/next/cxx-loader.d.ts",
51
- "default": "./dist/next/cxx-loader.js"
52
- },
53
- "./vite-plugin-cxx": {
54
- "types": "./dist/vite-plugin-cxx/index.d.ts",
55
- "default": "./dist/vite-plugin-cxx/index.js"
56
- }
57
- },
58
- "bugs": {
59
- "url": "https://github.com/jk2908/cxx/issues"
60
- },
61
- "description": "Utilities for generating styles in React 19",
62
- "files": [
63
- "dist",
64
- "src"
65
- ],
66
- "homepage": "https://github.com/jk2908/cxx#readme",
67
- "keywords": [
68
- "react",
69
- "react19",
70
- "css",
71
- "css-in-js",
72
- "vite-plugin",
73
- "webpack-loader",
74
- "lightningcss",
75
- "next",
76
- "vite"
77
- ],
78
- "license": "MIT",
79
- "peerDependenciesMeta": {
80
- "next": {
81
- "optional": true
82
- },
83
- "vite": {
84
- "optional": true
85
- }
86
- }
87
- }
1
+ {
2
+ "name": "@jk2908/cxx",
3
+ "version": "0.1.5-canary",
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
+ "default": "./dist/inject/index.js"
44
+ },
45
+ "./next": {
46
+ "types": "./dist/next/index.d.ts",
47
+ "default": "./dist/next/index.js"
48
+ },
49
+ "./next/cxx-loader": {
50
+ "types": "./dist/next/cxx-loader.d.ts",
51
+ "default": "./dist/next/cxx-loader.js"
52
+ },
53
+ "./vite-plugin-cxx": {
54
+ "types": "./dist/vite-plugin-cxx/index.d.ts",
55
+ "default": "./dist/vite-plugin-cxx/index.js"
56
+ }
57
+ },
58
+ "bugs": {
59
+ "url": "https://github.com/jk2908/cxx/issues"
60
+ },
61
+ "description": "Utilities for generating styles in React 19",
62
+ "files": [
63
+ "dist",
64
+ "src"
65
+ ],
66
+ "homepage": "https://github.com/jk2908/cxx#readme",
67
+ "keywords": [
68
+ "react",
69
+ "react19",
70
+ "css",
71
+ "css-in-js",
72
+ "vite-plugin",
73
+ "webpack-loader",
74
+ "lightningcss",
75
+ "next",
76
+ "vite"
77
+ ],
78
+ "license": "MIT",
79
+ "peerDependenciesMeta": {
80
+ "next": {
81
+ "optional": true
82
+ },
83
+ "vite": {
84
+ "optional": true
85
+ }
86
+ }
87
+ }
package/src/next/index.ts CHANGED
@@ -27,5 +27,13 @@ export function withCxx(nextConfig: NextConfig = {}, config?: Config) {
27
27
 
28
28
  return resolvedNextConfig
29
29
  },
30
+ turbo: {
31
+ rules: {
32
+ './app/**/*.tsx': {
33
+ loaders: [path.resolve(__dirname, 'cxx-loader.js')],
34
+ as: './tsx'
35
+ }
36
+ }
37
+ }
30
38
  }
31
39
  }