@nx/angular-rspack 19.0.0-alpha.30 → 20.5.0-beta.2

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,5 +1,6 @@
1
1
  import type { FileReplacement, InlineStyleLanguage, StylePreprocessorOptions } from '@nx/angular-rspack-compiler';
2
- export interface DevServerOptions {
2
+ import type { DevServerUnsupportedOptions, PluginUnsupportedOptions } from './unsupported-options';
3
+ export interface DevServerOptions extends DevServerUnsupportedOptions {
3
4
  port?: number;
4
5
  ssl?: boolean;
5
6
  sslKey?: string;
@@ -61,54 +62,60 @@ export interface SourceMap {
61
62
  hidden: boolean;
62
63
  vendor: boolean;
63
64
  }
64
- export interface AngularRspackPluginOptions {
65
- index: IndexElement;
66
- browser: string;
65
+ export interface AngularRspackPluginOptions extends PluginUnsupportedOptions {
66
+ aot?: boolean;
67
+ assets?: AssetElement[];
68
+ browser?: string;
69
+ commonChunk?: boolean;
70
+ devServer?: DevServerOptions;
71
+ extractLicenses?: boolean;
72
+ fileReplacements?: FileReplacement[];
73
+ index?: IndexElement;
74
+ inlineStyleLanguage?: InlineStyleLanguage;
75
+ namedChunks?: boolean;
76
+ optimization?: boolean | OptimizationOptions;
77
+ outputHashing?: OutputHashing;
78
+ outputPath?: string | (Required<Pick<OutputPath, 'base'>> & Partial<OutputPath>);
79
+ polyfills?: string[];
80
+ root?: string;
81
+ scripts?: ScriptOrStyleEntry[];
67
82
  server?: string;
83
+ skipTypeChecking?: boolean;
84
+ sourceMap?: boolean | Partial<SourceMap>;
68
85
  ssr?: boolean | {
69
86
  entry: string;
70
87
  experimentalPlatform?: 'node' | 'neutral';
71
88
  };
72
- polyfills: string[];
73
- assets?: AssetElement[];
89
+ stylePreprocessorOptions?: StylePreprocessorOptions;
74
90
  styles?: ScriptOrStyleEntry[];
75
- scripts?: ScriptOrStyleEntry[];
76
- outputPath: string | (Required<Pick<OutputPath, 'base'>> & Partial<OutputPath>);
77
- fileReplacements: FileReplacement[];
78
- aot: boolean;
79
- inlineStyleLanguage: InlineStyleLanguage;
80
- tsConfig: string;
81
- hasServer: boolean;
82
- sourceMap?: boolean | Partial<SourceMap>;
83
- skipTypeChecking: boolean;
91
+ tsConfig?: string;
84
92
  useTsProjectReferences?: boolean;
85
- optimization?: boolean | OptimizationOptions;
86
- outputHashing?: OutputHashing;
87
- stylePreprocessorOptions?: StylePreprocessorOptions;
88
- namedChunks?: boolean;
89
93
  vendorChunk?: boolean;
90
- commonChunk?: boolean;
91
- devServer?: DevServerOptions;
92
- extractLicenses?: boolean;
93
- root?: string;
94
94
  }
95
95
  export interface NormalizedAngularRspackPluginOptions extends Omit<AngularRspackPluginOptions, 'index' | 'scripts' | 'styles'> {
96
96
  advancedOptimizations: boolean;
97
+ aot: boolean;
97
98
  assets: NormalizedAssetElement[];
98
- index: NormalizedIndexElement | undefined;
99
+ browser: string;
100
+ commonChunk: boolean;
99
101
  devServer: DevServerOptions & {
100
102
  port: number;
101
103
  };
102
104
  extractLicenses: boolean;
103
- namedChunks: boolean;
104
- vendorChunk: boolean;
105
- commonChunk: boolean;
105
+ fileReplacements: FileReplacement[];
106
106
  globalScripts: GlobalEntry[];
107
107
  globalStyles: GlobalEntry[];
108
+ index: NormalizedIndexElement | undefined;
109
+ inlineStyleLanguage: InlineStyleLanguage;
110
+ hasServer: boolean;
111
+ namedChunks: boolean;
108
112
  optimization: boolean | OptimizationOptions;
109
113
  outputHashing: OutputHashing;
110
114
  outputPath: OutputPath;
115
+ polyfills: string[];
111
116
  root: string;
112
117
  sourceMap: SourceMap;
118
+ tsConfig: string;
119
+ vendorChunk: boolean;
113
120
  }
114
121
  //# sourceMappingURL=angular-rspack-plugin-options.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"angular-rspack-plugin-options.d.ts","sourceRoot":"","sources":["../../../src/lib/models/angular-rspack-plugin-options.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,eAAe,EACf,mBAAmB,EACnB,wBAAw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AAW,EAAE,CAAC;IAC5B,YAAY,EAAE,OAAO,GAAG,mBAAmB,CAAC;IAC5C,aAAa,EAAE,aAAa,CAAC;IAC7B,UAAU,EAAE,UAAU,CAAC;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,SAAS,CAAC;CACtB"}
1
+ {"version":3,"file":"angular-rspack-plugin-options.d.ts","sourceRoot":"","sources":["../../../src/lib/models/angular-rspack-plugin-options.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,eAAe,EACf,mBAAmB,EACnB,wBAAwB,EACzB,MAAM,6BAA6B,CAAC;AACrC,OAAO,KAAK,EACV,2BAA2B,EAC3B,wBAAwB,EACzB,MAAM,uBAAuB,CAAC;AAE/B,MAAM,WAAW,gBAAiB,SAAQ,2BAA2B;IACnE,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,GAAG,CAAC,EAAE,OAAO,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,mBAAmB;IAClC,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAED,MAAM,MAAM,aAAa,GAAG,MAAM,GAAG,KAAK,GAAG,OAAO,GAAG,SAAS,CAAC;AACjE,MAAM,MAAM,UAAU,GAAG;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,MAAM,WAAW,UAAU;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,MAAM,uBAAuB,GAAG;I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AAE,EACnC,IAAI,EAAE,MAAM,GACX,eAAe,EAAE,CAKnB;AAED,wBAAgB,YAAY,CAC1B,IAAI,EAAE,MAAM,EACZ,MAAM,EAAE,MAAM,GAAG,SAAS,EAC1B,GAAG,EAAE,0BAA0B,CAAC,KAAK,CAAC,GACrC,OAAO,CAQT;AAED,wBAAgB,WAAW,CAAC,GAAG,EAAE,0BAA0B,CAAC,KAAK,CAAC,QAmBjE;AAED,wBAAgB,oBAAoB,CAClC,YAAY,EAAE,0BAA0B,CAAC,cAAc,CAAC,QASzD;AAED,wBAAgB,gBAAgB,CAC9B,OAAO,EAAE,0BAA0B,GAClC,oCAAoC,CAsItC"}
1
+ {"version":3,"file":"normalize-options.d.ts","sourceRoot":"","sources":["../../../src/lib/models/normalize-options.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAiB9D,OAAO,KAAK,EACV,0BAA0B,EAI1B,oCAAoC,EAMrC,MAAM,iCAAiC,CAAC;AAMzC,eAAO,MAAM,cAAc,mBAAmB,CAAC;AAE/C;;;;;;GAMG;AACH,wBAAgB,uBAAuB,CACrC,gBAAgB,EAAE,eAAe,EAAE,EACnC,IAAI,EAAE,MAAM,GACX,eAAe,EAAE,CAKnB;AAED,wBAAgB,YAAY,CAC1B,IAAI,EAAE,MAAM,EACZ,MAAM,EAAE,MAAM,GAAG,SAAS,EAC1B,GAAG,EAAE,0BAA0B,CAAC,KAAK,CAAC,GACrC,OAAO,CAQT;AAED,wBAAgB,WAAW,CAAC,GAAG,EAAE,0BAA0B,CAAC,KAAK,CAAC,QAmBjE;AAED,wBAAgB,oBAAoB,CAClC,YAAY,EAAE,0BAA0B,CAAC,cAAc,CAAC,QASzD;AA0BD,wBAAgB,gBAAgB,CAC9B,OAAO,EAAE,0BAA0B,GAClC,oCAAoC,CA0ItC"}
@@ -11,7 +11,7 @@ const devkit_1 = require("@nx/devkit");
11
11
  const node_assert_1 = tslib_1.__importDefault(require("node:assert"));
12
12
  const node_fs_1 = require("node:fs");
13
13
  const node_path_1 = require("node:path");
14
- const find_project_for_path_1 = require("nx/src/project-graph/utils/find-project-for-path");
14
+ const unsupported_options_1 = require("./unsupported-options");
15
15
  exports.INDEX_HTML_CSR = 'index.csr.html';
16
16
  /**
17
17
  * Resolves file replacement paths to absolute paths based on the provided root directory.
@@ -55,7 +55,19 @@ function validateOptimization(optimization) {
55
55
  if (typeof optimization === 'object')
56
56
  console.warn('The "optimization" option currently only supports a boolean value. Please check the documentation.');
57
57
  }
58
+ function validateGeneralUnsupportedOptions(options) {
59
+ const topLevelUnsupportedOptions = unsupported_options_1.TOP_LEVEL_OPTIONS_PENDING_SUPPORT.filter((option) => options[option] !== undefined).sort();
60
+ const devServerUnsupportedOptions = unsupported_options_1.DEV_SERVER_OPTIONS_PENDING_SUPPORT.filter((option) => options.devServer?.[option] !== undefined).sort();
61
+ const unsupportedOptions = [
62
+ ...topLevelUnsupportedOptions.map((option) => `"${option}"`),
63
+ ...devServerUnsupportedOptions.map((option) => `"devServer.${option}"`),
64
+ ];
65
+ if (unsupportedOptions.length > 0) {
66
+ console.warn(`The following options are not yet supported:\n ${unsupportedOptions.join('\n ')}\n`);
67
+ }
68
+ }
58
69
  function normalizeOptions(options) {
70
+ validateGeneralUnsupportedOptions(options);
59
71
  const { fileReplacements = [], server, ssr, optimization } = options;
60
72
  validateSsr(ssr);
61
73
  const normalizedSsr = !ssr
@@ -86,6 +98,9 @@ function normalizeOptions(options) {
86
98
  console.warn('Disabling the "index" option is not yet supported. Defaulting to "src/index.html".');
87
99
  options.index = (0, node_path_1.join)(root, 'src/index.html');
88
100
  }
101
+ else if (!options.index) {
102
+ options.index = (0, node_path_1.join)(root, 'src/index.html');
103
+ }
89
104
  let index;
90
105
  // index can never have a value of `true` but in the schema it's of type `boolean`.
91
106
  if (typeof options.index !== 'boolean') {
@@ -137,32 +152,32 @@ function normalizeOptions(options) {
137
152
  };
138
153
  }
139
154
  return {
140
- index,
141
- browser: options.browser ?? './src/main.ts',
142
- ...(server ? { server } : {}),
143
- ...(ssr ? { ssr: normalizedSsr } : {}),
144
- optimization: normalizedOptimization,
145
155
  advancedOptimizations,
146
- polyfills: options.polyfills ?? [],
147
156
  assets,
157
+ aot,
158
+ browser: options.browser ?? './src/main.ts',
159
+ commonChunk: options.commonChunk ?? true,
160
+ devServer: normalizeDevServer(options.devServer),
161
+ extractLicenses: options.extractLicenses ?? true,
162
+ fileReplacements: resolveFileReplacements(fileReplacements, root),
148
163
  globalStyles,
149
164
  globalScripts,
150
- outputPath: normalizeOutputPath(root, options.outputPath),
151
- fileReplacements: resolveFileReplacements(fileReplacements, root),
152
- aot,
153
- outputHashing: options.outputHashing ?? 'all',
154
- inlineStyleLanguage: options.inlineStyleLanguage ?? 'css',
155
- tsConfig,
156
- sourceMap: normalizeSourceMap(options.sourceMap),
157
165
  hasServer: getHasServer(root, server, normalizedSsr),
166
+ index,
167
+ inlineStyleLanguage: options.inlineStyleLanguage ?? 'css',
168
+ namedChunks: options.namedChunks ?? false,
169
+ optimization: normalizedOptimization,
170
+ outputHashing: options.outputHashing ?? 'all',
171
+ outputPath: normalizeOutputPath(root, options.outputPath),
172
+ polyfills: options.polyfills ?? [],
173
+ root,
174
+ server,
158
175
  skipTypeChecking: options.skipTypeChecking ?? false,
176
+ sourceMap: normalizeSourceMap(options.sourceMap),
177
+ ssr: normalizedSsr,
178
+ tsConfig,
159
179
  useTsProjectReferences: options.useTsProjectReferences ?? false,
160
- namedChunks: options.namedChunks ?? false,
161
180
  vendorChunk: options.vendorChunk ?? false,
162
- commonChunk: options.commonChunk ?? true,
163
- devServer: normalizeDevServer(options.devServer),
164
- extractLicenses: options.extractLicenses ?? true,
165
- root,
166
181
  };
167
182
  }
168
183
  function normalizeSourceMap(sourceMap) {
@@ -354,9 +369,36 @@ function getProject(root) {
354
369
  const projectGraph = (0, devkit_1.readCachedProjectGraph)();
355
370
  let projectName = process.env.NX_TASK_TARGET_PROJECT;
356
371
  if (!projectName) {
357
- const projectRootMappings = (0, find_project_for_path_1.createProjectRootMappings)(projectGraph.nodes);
358
- projectName = (0, find_project_for_path_1.findProjectForPath)(root, projectRootMappings) ?? undefined;
372
+ const projectRootMappings = createProjectRootMappings(projectGraph.nodes);
373
+ projectName = findProjectForPath(root, projectRootMappings) ?? undefined;
359
374
  }
360
375
  (0, node_assert_1.default)(projectName, 'Cannot find the project. Please make sure to run this task with the Nx CLI and set "root" to a directory contained in a project.');
361
376
  return projectGraph.nodes[projectName];
362
377
  }
378
+ function createProjectRootMappings(nodes) {
379
+ const projectRootMappings = new Map();
380
+ for (const projectName of Object.keys(nodes)) {
381
+ const root = nodes[projectName].data.root;
382
+ projectRootMappings.set(normalizeProjectRoot(root), projectName);
383
+ }
384
+ return projectRootMappings;
385
+ }
386
+ function findProjectForPath(filePath, projectRootMap) {
387
+ /**
388
+ * Project Mappings are in UNIX-style file paths
389
+ * Windows may pass Win-style file paths
390
+ * Ensure filePath is in UNIX-style
391
+ */
392
+ let currentPath = (0, devkit_1.normalizePath)(filePath);
393
+ for (; currentPath != (0, node_path_1.dirname)(currentPath); currentPath = (0, node_path_1.dirname)(currentPath)) {
394
+ const p = projectRootMap.get(currentPath);
395
+ if (p) {
396
+ return p;
397
+ }
398
+ }
399
+ return projectRootMap.get(currentPath);
400
+ }
401
+ function normalizeProjectRoot(root) {
402
+ root = root === '' ? '.' : root;
403
+ return root && root.endsWith('/') ? root.substring(0, root.length - 1) : root;
404
+ }
@@ -0,0 +1,60 @@
1
+ export type BudgetEntry = {
2
+ type: 'all' | 'allScript' | 'any' | 'anyScript' | 'anyComponentStyle' | 'bundle' | 'initial';
3
+ name?: string;
4
+ baseline?: string;
5
+ maximumWarning?: string;
6
+ maximumError?: string;
7
+ minimumWarning?: string;
8
+ minimumError?: string;
9
+ warning?: string;
10
+ error?: string;
11
+ };
12
+ export interface DevServerUnsupportedOptions {
13
+ allowedHosts?: string[] | boolean;
14
+ headers?: Record<string, string>;
15
+ open?: boolean;
16
+ liveReload?: boolean;
17
+ servePath?: string;
18
+ hmr?: boolean;
19
+ inspect?: string | boolean;
20
+ prebundle?: boolean | {
21
+ exclude: string[];
22
+ };
23
+ }
24
+ export interface PluginUnsupportedOptions {
25
+ deployUrl?: string;
26
+ security?: {
27
+ autoCsp?: boolean | {
28
+ unsafeEval?: boolean;
29
+ };
30
+ };
31
+ externalDependencies?: string[];
32
+ clearScreen?: boolean;
33
+ define?: Record<string, string>;
34
+ baseHref?: string;
35
+ verbose?: boolean;
36
+ progress?: boolean;
37
+ i18nMissingTranslation?: 'warning' | 'error' | 'ignore';
38
+ i18nDuplicateTranslation?: 'warning' | 'error' | 'ignore';
39
+ localize?: boolean | string[];
40
+ watch?: boolean;
41
+ poll?: number;
42
+ deleteOutputPath?: boolean;
43
+ preserveSymlinks?: boolean;
44
+ subresourceIntegrity?: boolean;
45
+ serviceWorker?: string | false;
46
+ statsJson?: boolean;
47
+ budgets?: BudgetEntry[];
48
+ webWorkerTsConfig?: string;
49
+ crossOrigin?: 'none' | 'anonymous' | 'use-credentials';
50
+ allowedCommonJsDependencies?: string[];
51
+ prerender?: boolean | {
52
+ routesFile?: string;
53
+ discoverRoutes?: boolean;
54
+ };
55
+ appShell?: boolean;
56
+ outputMode?: 'static' | 'server';
57
+ }
58
+ export declare const TOP_LEVEL_OPTIONS_PENDING_SUPPORT: string[];
59
+ export declare const DEV_SERVER_OPTIONS_PENDING_SUPPORT: string[];
60
+ //# sourceMappingURL=unsupported-options.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"unsupported-options.d.ts","sourceRoot":"","sources":["../../../src/lib/models/unsupported-options.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,WAAW,GAAG;IACxB,IAAI,EACA,KAAK,GACL,WAAW,GACX,KAAK,GACL,WAAW,GACX,mBAAmB,GACnB,QAAQ,GACR,SAAS,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;I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C,EAAE,OAAO,GAAG,MAAM,EAAE,CAAC;IAC9B,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,aAAa,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC;IAC/B,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,OAAO,CAAC,EAAE,WAAW,EAAE,CAAC;IACxB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,WAAW,CAAC,EAAE,MAAM,GAAG,WAAW,GAAG,iBAAiB,CAAC;IACvD,2BAA2B,CAAC,EAAE,MAAM,EAAE,CAAC;IACvC,SAAS,CAAC,EACN,OAAO,GACP;QACE,UAAU,CAAC,EAAE,MAAM,CAAC;QACpB,cAAc,CAAC,EAAE,OAAO,CAAC;KAC1B,CAAC;IACN,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,UAAU,CAAC,EAAE,QAAQ,GAAG,QAAQ,CAAC;CAClC;AAED,eAAO,MAAM,iCAAiC,UA0B7C,CAAC;AAEF,eAAO,MAAM,kCAAkC,UAS9C,CAAC"}
@@ -0,0 +1,40 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.DEV_SERVER_OPTIONS_PENDING_SUPPORT = exports.TOP_LEVEL_OPTIONS_PENDING_SUPPORT = void 0;
4
+ exports.TOP_LEVEL_OPTIONS_PENDING_SUPPORT = [
5
+ 'deployUrl',
6
+ 'security',
7
+ 'externalDependencies',
8
+ 'clearScreen',
9
+ 'define',
10
+ 'baseHref',
11
+ 'verbose',
12
+ 'progress',
13
+ 'i18nMissingTranslation',
14
+ 'i18nDuplicateTranslation',
15
+ 'localize',
16
+ 'watch',
17
+ 'poll',
18
+ 'deleteOutputPath',
19
+ 'preserveSymlinks',
20
+ 'subresourceIntegrity',
21
+ 'serviceWorker',
22
+ 'statsJson',
23
+ 'budgets',
24
+ 'webWorkerTsConfig',
25
+ 'crossOrigin',
26
+ 'allowedCommonJsDependencies',
27
+ 'prerender',
28
+ 'appShell',
29
+ 'outputMode',
30
+ ];
31
+ exports.DEV_SERVER_OPTIONS_PENDING_SUPPORT = [
32
+ 'allowedHosts',
33
+ 'headers',
34
+ 'open',
35
+ 'liveReload',
36
+ 'servePath',
37
+ 'hmr',
38
+ 'inspect',
39
+ 'prebundle',
40
+ ];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nx/angular-rspack",
3
- "version": "19.0.0-alpha.30",
3
+ "version": "20.5.0-beta.2",
4
4
  "private": false,
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -56,7 +56,7 @@
56
56
  "tslib": "^2.3.0",
57
57
  "webpack-merge": "^6.0.1",
58
58
  "ws": "^8.18.0",
59
- "@nx/angular-rspack-compiler": "19.0.0-alpha.30"
59
+ "@nx/angular-rspack-compiler": "20.5.0-beta.2"
60
60
  },
61
61
  "devDependencies": {
62
62
  "@ng-rspack/testing-setup": "0.0.1"
@@ -70,6 +70,9 @@
70
70
  "name": "angular-rspack",
71
71
  "sourceRoot": "packages/angular-rspack/src",
72
72
  "projectType": "library",
73
+ "tags": [
74
+ "publishable"
75
+ ],
73
76
  "targets": {
74
77
  "code-pushup": {},
75
78
  "unit-test": {
@@ -1,13 +0,0 @@
1
- import { CoreConfig } from '@code-pushup/models';
2
- import { mergeConfigs } from '@code-pushup/utils';
3
- import {
4
- baseConfig,
5
- coverageCoreConfig,
6
- eslintConfig,
7
- } from '../../tools/reports/code-pushup.preset.config';
8
-
9
- export default mergeConfigs(
10
- baseConfig as CoreConfig,
11
- await eslintConfig(),
12
- await coverageCoreConfig()
13
- );
@@ -1,42 +0,0 @@
1
- const baseConfig = require('../../eslint.config.js');
2
-
3
- module.exports = [
4
- ...baseConfig,
5
- {
6
- files: ['**/*.ts'],
7
- languageOptions: {
8
- parserOptions: {
9
- projectService: true,
10
- tsconfigRootDir: __dirname,
11
- },
12
- },
13
- },
14
- {
15
- files: ['**/*.json'],
16
- rules: {
17
- '@nx/dependency-checks': [
18
- 'error',
19
- {
20
- ignoredFiles: [
21
- '{projectRoot}/eslint.config.{js,cjs,mjs}',
22
- '{projectRoot}/vite.config.{js,ts,mjs,mts}',
23
- '{projectRoot}/vitest*.config.{js,ts,mjs,mts}',
24
- ],
25
- ignoredDependencies: [
26
- 'nx',
27
- 'css-loader',
28
- 'less-loader',
29
- 'sass-loader',
30
- 'sass-embedded',
31
- '@angular/core',
32
- 'rxjs',
33
- '@ng-rspack/build',
34
- ],
35
- },
36
- ],
37
- },
38
- languageOptions: {
39
- parser: require('jsonc-eslint-parser'),
40
- },
41
- },
42
- ];
package/vitest.config.mts DELETED
@@ -1,21 +0,0 @@
1
- import { defineConfig } from 'vitest/config';
2
- import { EXCLUDED_FILES_TEST } from '@ng-rspack/testing-setup';
3
-
4
- export default defineConfig({
5
- cacheDir: '../../node_modules/.vite/ng-rspack-build/unit',
6
- root: __dirname,
7
- test: {
8
- watch: false,
9
- globals: true,
10
- environment: 'node',
11
- include: ['src/**/*.unit.test.{js,mjs,cjs,ts,mts,cts,jsx,tsx}'],
12
- coverage: {
13
- provider: 'v8',
14
- reporter: ['text', 'lcov'],
15
- reportsDirectory: '../../coverage/build/unit',
16
- exclude: [...EXCLUDED_FILES_TEST],
17
- },
18
- reporters: ['default'],
19
- passWithNoTests: true,
20
- },
21
- });
@@ -1,28 +0,0 @@
1
- import { defineConfig } from 'vitest/config';
2
- import { resolve } from 'path';
3
- import { EXCLUDED_FILES_TEST } from '@ng-rspack/testing-setup';
4
-
5
- export default defineConfig({
6
- root: __dirname,
7
- cacheDir: '../../node_modules/.vite/build/integration',
8
- plugins: [],
9
- resolve: {
10
- alias: {
11
- '@ng-rspack/testing-utils': resolve(__dirname, '../../testing/utils/src'),
12
- },
13
- },
14
- test: {
15
- watch: false,
16
- globals: true,
17
- environment: 'node',
18
- include: ['src/**/*.integration.test.{js,mjs,cjs,ts,mts,cts,jsx,tsx}'],
19
- passWithNoTests: true,
20
- reporters: ['default'],
21
- coverage: {
22
- provider: 'v8',
23
- reporter: ['text', 'lcov'],
24
- reportsDirectory: '../../coverage/build/integration',
25
- exclude: [...EXCLUDED_FILES_TEST],
26
- },
27
- },
28
- });