nx 20.5.0-canary.20250225-cd361ef → 20.5.0-canary.20250227-6d40b6a

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
- "use strict";(self.webpackChunk=self.webpackChunk||[]).push([[532],{5751:()=>{}},s=>{var e;e=5751,s(s.s=e)}]);
1
+ "use strict";(self.webpackChunk=self.webpackChunk||[]).push([[532],{2558:()=>{}},s=>{var e;e=2558,s(s.s=e)}]);
Binary file
@@ -1 +0,0 @@
1
- export declare function writeCracoConfig(appName: string, isCRA5: boolean, isStandalone: boolean): void;
@@ -1,61 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.writeCracoConfig = writeCracoConfig;
4
- const fs_1 = require("fs");
5
- function writeCracoConfig(appName, isCRA5, isStandalone) {
6
- const configOverride = `
7
- const path = require('path');
8
- const TsConfigPathsPlugin = require('tsconfig-paths-webpack-plugin');
9
- const ModuleScopePlugin = require('react-dev-utils/ModuleScopePlugin');
10
- module.exports = {
11
- webpack: {
12
- configure: (config) => {
13
- // Remove guard against importing modules outside of \`src\`.
14
- // Needed for workspace projects.
15
- config.resolve.plugins = config.resolve.plugins.filter(
16
- (plugin) => !(plugin instanceof ModuleScopePlugin)
17
- );
18
- // Add support for importing workspace projects.
19
- config.resolve.plugins.push(
20
- new TsConfigPathsPlugin({
21
- configFile: path.resolve(__dirname, 'tsconfig.json'),
22
- extensions: ['.ts', '.tsx', '.js', '.jsx'],
23
- mainFields: ['browser', 'module', 'main'],
24
- })
25
- );
26
- ${isCRA5
27
- ? `
28
- // Replace include option for babel loader with exclude
29
- // so babel will handle workspace projects as well.
30
- config.module.rules[1].oneOf.forEach((r) => {
31
- if (r.loader && r.loader.indexOf('babel') !== -1) {
32
- r.exclude = /node_modules/;
33
- delete r.include;
34
- }
35
- });`
36
- : `
37
- // Replace include option for babel loader with exclude
38
- // so babel will handle workspace projects as well.
39
- config.module.rules.forEach((r) => {
40
- if (r.oneOf) {
41
- const babelLoader = r.oneOf.find(
42
- (rr) => rr.loader.indexOf('babel-loader') !== -1
43
- );
44
- babelLoader.exclude = /node_modules/;
45
- delete babelLoader.include;
46
- }
47
- });
48
- `}
49
- return config;
50
- },
51
- },
52
- jest: {
53
- configure: (config) => {
54
- config.resolver = '@nx/jest/plugins/resolver';
55
- return config;
56
- },
57
- },
58
- };
59
- `;
60
- (0, fs_1.writeFileSync)(isStandalone ? 'craco.config.js' : `apps/${appName}/craco.config.js`, configOverride);
61
- }