@rspack/core
Advanced tools
Comparing version 0.7.5-canary-87a73c3a-20240620004559 to 0.7.5-canary-910259c-20240622004334
@@ -88,5 +88,14 @@ "use strict"; | ||
} | ||
function getRawTsConfig(tsConfig) { | ||
(0, assert_1.default)(typeof tsConfig !== "string", "should resolve string tsConfig in normalization"); | ||
if (tsConfig === undefined) | ||
return tsConfig; | ||
const { configFile, references } = tsConfig; | ||
return { | ||
configFile, | ||
referencesType: references == "auto" ? "auto" : references ? "manual" : "disabled", | ||
references: references == "auto" ? undefined : references | ||
}; | ||
} | ||
function getRawResolve(resolve) { | ||
let references = resolve.tsConfig?.references; | ||
let tsconfigConfigFile = resolve.tsConfigPath ?? resolve.tsConfig?.configFile; | ||
return { | ||
@@ -97,9 +106,3 @@ ...resolve, | ||
extensionAlias: getRawExtensionAlias(resolve.extensionAlias), | ||
tsconfig: tsconfigConfigFile | ||
? { | ||
configFile: tsconfigConfigFile, | ||
referencesType: references == "auto" ? "auto" : references ? "manual" : "disabled", | ||
references: references == "auto" ? undefined : references | ||
} | ||
: undefined, | ||
tsconfig: getRawTsConfig(resolve.tsConfig), | ||
byDependency: getRawResolveByDependency(resolve.byDependency) | ||
@@ -106,0 +109,0 @@ }; |
@@ -19,16 +19,5 @@ "use strict"; | ||
let expr = o.rspackExperiments; | ||
const contextPath = options.context; | ||
const production = options.mode === "production" || !options.mode; | ||
if (expr.emotion) { | ||
expr.emotion = (0, builtin_loader_1.resolveEmotion)(expr.emotion, production); | ||
} | ||
if (expr.relay) { | ||
expr.relay = (0, builtin_loader_1.resolveRelay)(expr.relay, contextPath); | ||
} | ||
if (expr.import || expr.pluginImport) { | ||
expr.import = (0, builtin_loader_1.resolvePluginImport)(expr.import || expr.pluginImport); | ||
} | ||
if (expr.react) { | ||
expr.react = (0, builtin_loader_1.resolveReact)(expr.react); | ||
} | ||
if (expr.preact) { | ||
@@ -35,0 +24,0 @@ expr.preact = (0, builtin_loader_1.resolvePreact)(expr.preact); |
@@ -126,6 +126,16 @@ "use strict"; | ||
resolve: nestedConfig(config.resolve, resolve => ({ | ||
...resolve | ||
...resolve, | ||
tsConfig: optionalNestedConfig(resolve.tsConfig, tsConfig => { | ||
return typeof tsConfig === "string" | ||
? { configFile: tsConfig } | ||
: tsConfig; | ||
}) | ||
})), | ||
resolveLoader: nestedConfig(config.resolveLoader, resolve => ({ | ||
...resolve | ||
...resolve, | ||
tsConfig: optionalNestedConfig(resolve.tsConfig, tsConfig => { | ||
return typeof tsConfig === "string" | ||
? { configFile: tsConfig } | ||
: tsConfig; | ||
}) | ||
})), | ||
@@ -132,0 +142,0 @@ module: nestedConfig(config.module, module => ({ |
@@ -233,6 +233,7 @@ "use strict"; | ||
.or(zod_1.z.array(zod_1.z.string().or(zod_1.z.literal(false))))); | ||
const resolveTsconfig = zod_1.z.strictObject({ | ||
configFile: zod_1.z.string(), | ||
const resolveTsConfigFile = zod_1.z.string(); | ||
const resolveTsConfig = resolveTsConfigFile.or(zod_1.z.strictObject({ | ||
configFile: resolveTsConfigFile, | ||
references: zod_1.z.array(zod_1.z.string()).or(zod_1.z.literal("auto")).optional() | ||
}); | ||
})); | ||
const baseResolveOptions = zod_1.z.strictObject({ | ||
@@ -252,4 +253,3 @@ alias: resolveAlias.optional(), | ||
descriptionFiles: zod_1.z.array(zod_1.z.string()).optional(), | ||
tsConfigPath: zod_1.z.string().optional(), | ||
tsConfig: resolveTsconfig.optional(), | ||
tsConfig: resolveTsConfig.optional(), | ||
fullySpecified: zod_1.z.boolean().optional(), | ||
@@ -256,0 +256,0 @@ exportsFields: zod_1.z.array(zod_1.z.string()).optional(), |
{ | ||
"name": "@rspack/core", | ||
"version": "0.7.5-canary-87a73c3a-20240620004559", | ||
"version": "0.7.5-canary-910259c-20240622004334", | ||
"webpackVersion": "5.75.0", | ||
@@ -77,4 +77,4 @@ "license": "MIT", | ||
"zod-validation-error": "1.3.1", | ||
"@rspack/plugin-minify": "^0.7.5-canary-87a73c3a-20240620004559", | ||
"@rspack/core": "0.7.5-canary-87a73c3a-20240620004559" | ||
"@rspack/plugin-minify": "^0.7.5-canary-910259c-20240622004334", | ||
"@rspack/core": "0.7.5-canary-910259c-20240622004334" | ||
}, | ||
@@ -86,3 +86,3 @@ "dependencies": { | ||
"webpack-sources": "3.2.3", | ||
"@rspack/binding": "0.7.5-canary-87a73c3a-20240620004559" | ||
"@rspack/binding": "0.7.5-canary-910259c-20240622004334" | ||
}, | ||
@@ -89,0 +89,0 @@ "peerDependencies": { |
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
2592771
66372
+ Added@rspack/binding@0.7.5-canary-910259c-20240622004334(transitive)
+ Added@rspack/binding-darwin-arm64@0.7.5-canary-910259c-20240622004334(transitive)
+ Added@rspack/binding-darwin-x64@0.7.5-canary-910259c-20240622004334(transitive)
+ Added@rspack/binding-linux-arm64-gnu@0.7.5-canary-910259c-20240622004334(transitive)
+ Added@rspack/binding-linux-arm64-musl@0.7.5-canary-910259c-20240622004334(transitive)
+ Added@rspack/binding-linux-x64-gnu@0.7.5-canary-910259c-20240622004334(transitive)
+ Added@rspack/binding-linux-x64-musl@0.7.5-canary-910259c-20240622004334(transitive)
+ Added@rspack/binding-win32-arm64-msvc@0.7.5-canary-910259c-20240622004334(transitive)
+ Added@rspack/binding-win32-ia32-msvc@0.7.5-canary-910259c-20240622004334(transitive)
+ Added@rspack/binding-win32-x64-msvc@0.7.5-canary-910259c-20240622004334(transitive)
- Removed@rspack/binding@0.7.5-canary-87a73c3a-20240620004559(transitive)
- Removed@rspack/binding-darwin-arm64@0.7.5-canary-87a73c3a-20240620004559(transitive)
- Removed@rspack/binding-darwin-x64@0.7.5-canary-87a73c3a-20240620004559(transitive)
- Removed@rspack/binding-linux-arm64-gnu@0.7.5-canary-87a73c3a-20240620004559(transitive)
- Removed@rspack/binding-linux-arm64-musl@0.7.5-canary-87a73c3a-20240620004559(transitive)
- Removed@rspack/binding-linux-x64-gnu@0.7.5-canary-87a73c3a-20240620004559(transitive)
- Removed@rspack/binding-linux-x64-musl@0.7.5-canary-87a73c3a-20240620004559(transitive)
- Removed@rspack/binding-win32-arm64-msvc@0.7.5-canary-87a73c3a-20240620004559(transitive)
- Removed@rspack/binding-win32-ia32-msvc@0.7.5-canary-87a73c3a-20240620004559(transitive)
- Removed@rspack/binding-win32-x64-msvc@0.7.5-canary-87a73c3a-20240620004559(transitive)