@anaemia/bundler 0.3.5 → 0.3.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.
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAU,MAAM,cAAc,CAAC;AAGrD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAqB1D,wBAAsB,eAAe,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,GAAE,aAAkB,GAAG,OAAO,CAAC,CAAC,aAAa,EAAE,aAAa,CAAC,CAAC,CAwI1H;AAED,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAU,MAAM,cAAc,CAAC;AAGrD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAqB1D,wBAAsB,eAAe,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,GAAE,aAAkB,GAAG,OAAO,CAAC,CAAC,aAAa,EAAE,aAAa,CAAC,CAAC,CAgJ1H;AAED,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC"}
package/dist/index.js CHANGED
@@ -99,7 +99,13 @@ export async function getRspackConfig(appRoot, config = {}) {
99
99
  styleRules.client,
100
100
  {
101
101
  ...createBabelRule({ isServer: false, isDev, plugins: [clientServerFnTransform, ...(isDev ? [solidRefreshPlugin] : []), ...extraClientBabelPlugins] }),
102
- exclude: /[\\/]node_modules[\\/](?!@anaemia[\\/]core|@solidjs[\\/]router)/,
102
+ exclude: (modulePath) => {
103
+ if (modulePath.includes("@anaemia") && modulePath.includes("core"))
104
+ return false;
105
+ if (modulePath.includes("@solidjs") && modulePath.includes("router"))
106
+ return false;
107
+ return modulePath.includes("node_modules");
108
+ },
103
109
  },
104
110
  ],
105
111
  },
@@ -131,7 +137,13 @@ export async function getRspackConfig(appRoot, config = {}) {
131
137
  styleRules.server,
132
138
  {
133
139
  ...createBabelRule({ isServer: true, isDev, plugins: [serverHashInjector, ...extraServerBabelPlugins] }),
134
- exclude: /[\\/]node_modules[\\/](?!@anaemia[\\/]core|@solidjs[\\/]router)/,
140
+ exclude: (modulePath) => {
141
+ if (modulePath.includes("@anaemia") && modulePath.includes("core"))
142
+ return false;
143
+ if (modulePath.includes("@solidjs") && modulePath.includes("router"))
144
+ return false;
145
+ return modulePath.includes("node_modules");
146
+ },
135
147
  },
136
148
  ],
137
149
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@anaemia/bundler",
3
- "version": "0.3.5",
3
+ "version": "0.3.6",
4
4
  "main": "./dist/index.js",
5
5
  "types": "./dist/index.d.ts",
6
6
  "type": "module",
@@ -11,7 +11,7 @@
11
11
  }
12
12
  },
13
13
  "dependencies": {
14
- "@anaemia/core": "^0.3.5",
14
+ "@anaemia/core": "^0.3.6",
15
15
  "@babel/core": "^7.29.7",
16
16
  "@babel/preset-typescript": "^7.29.7",
17
17
  "@rspack/core": "^2.0.5",
package/src/index.ts CHANGED
@@ -113,7 +113,11 @@ export async function getRspackConfig(appRoot: string, config: AnaemiaConfig = {
113
113
  styleRules.client,
114
114
  {
115
115
  ...createBabelRule({ isServer: false, isDev, plugins: [clientServerFnTransform, ...(isDev ? [solidRefreshPlugin] : []), ...extraClientBabelPlugins] }),
116
- exclude: /[\\/]node_modules[\\/](?!@anaemia[\\/]core|@solidjs[\\/]router)/,
116
+ exclude: (modulePath: string) => {
117
+ if (modulePath.includes("@anaemia") && modulePath.includes("core")) return false;
118
+ if (modulePath.includes("@solidjs") && modulePath.includes("router")) return false;
119
+ return modulePath.includes("node_modules");
120
+ },
117
121
  },
118
122
  ],
119
123
  },
@@ -146,7 +150,11 @@ export async function getRspackConfig(appRoot: string, config: AnaemiaConfig = {
146
150
  styleRules.server,
147
151
  {
148
152
  ...createBabelRule({ isServer: true, isDev, plugins: [serverHashInjector, ...extraServerBabelPlugins] }),
149
- exclude: /[\\/]node_modules[\\/](?!@anaemia[\\/]core|@solidjs[\\/]router)/,
153
+ exclude: (modulePath: string) => {
154
+ if (modulePath.includes("@anaemia") && modulePath.includes("core")) return false;
155
+ if (modulePath.includes("@solidjs") && modulePath.includes("router")) return false;
156
+ return modulePath.includes("node_modules");
157
+ },
150
158
  },
151
159
  ],
152
160
  },