@nx/web 17.0.0-beta.5 → 17.0.0-beta.8
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.
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nx/web",
|
|
3
|
-
"version": "17.0.0-beta.
|
|
3
|
+
"version": "17.0.0-beta.8",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "The Nx Plugin for Web Components contains generators for managing Web Component applications and libraries within an Nx workspace. It provides:\n\n\n- Integration with libraries such as Jest, Cypress, and Storybook.\n\n- Scaffolding for creating buildable libraries that can be published to npm.\n\n- Utilities for automatic workspace refactoring.",
|
|
6
6
|
"repository": {
|
|
@@ -34,9 +34,9 @@
|
|
|
34
34
|
"detect-port": "^1.5.1",
|
|
35
35
|
"http-server": "^14.1.0",
|
|
36
36
|
"tslib": "^2.3.0",
|
|
37
|
-
"@nx/devkit": "17.0.0-beta.
|
|
38
|
-
"@nx/js": "17.0.0-beta.
|
|
39
|
-
"@nrwl/web": "17.0.0-beta.
|
|
37
|
+
"@nx/devkit": "17.0.0-beta.8",
|
|
38
|
+
"@nx/js": "17.0.0-beta.8",
|
|
39
|
+
"@nrwl/web": "17.0.0-beta.8"
|
|
40
40
|
},
|
|
41
41
|
"publishConfig": {
|
|
42
42
|
"access": "public"
|
|
@@ -128,7 +128,7 @@ async function applicationGeneratorInternal(host, schema) {
|
|
|
128
128
|
createApplicationFiles(host, options);
|
|
129
129
|
await addProject(host, options);
|
|
130
130
|
if (options.bundler === 'vite') {
|
|
131
|
-
const { viteConfigurationGenerator } = (0, devkit_1.ensurePackage)('@nx/vite', versions_2.nxVersion);
|
|
131
|
+
const { viteConfigurationGenerator, createOrEditViteConfig } = (0, devkit_1.ensurePackage)('@nx/vite', versions_2.nxVersion);
|
|
132
132
|
// We recommend users use `import.meta.env.MODE` and other variables in their code to differentiate between production and development.
|
|
133
133
|
// See: https://vitejs.dev/guide/env-and-mode.html
|
|
134
134
|
if (host.exists((0, devkit_1.joinPathFragments)(options.appProjectRoot, 'src/environments'))) {
|
|
@@ -143,9 +143,15 @@ async function applicationGeneratorInternal(host, schema) {
|
|
|
143
143
|
skipFormat: true,
|
|
144
144
|
});
|
|
145
145
|
tasks.push(viteTask);
|
|
146
|
+
createOrEditViteConfig(host, {
|
|
147
|
+
project: options.projectName,
|
|
148
|
+
includeLib: false,
|
|
149
|
+
includeVitest: options.unitTestRunner === 'vitest',
|
|
150
|
+
inSourceTests: options.inSourceTests,
|
|
151
|
+
}, false);
|
|
146
152
|
}
|
|
147
153
|
if (options.bundler !== 'vite' && options.unitTestRunner === 'vitest') {
|
|
148
|
-
const { vitestGenerator } = (0, devkit_1.ensurePackage)('@nx/vite', versions_2.nxVersion);
|
|
154
|
+
const { vitestGenerator, createOrEditViteConfig } = (0, devkit_1.ensurePackage)('@nx/vite', versions_2.nxVersion);
|
|
149
155
|
const vitestTask = await vitestGenerator(host, {
|
|
150
156
|
uiFramework: 'none',
|
|
151
157
|
project: options.projectName,
|
|
@@ -154,13 +160,19 @@ async function applicationGeneratorInternal(host, schema) {
|
|
|
154
160
|
skipFormat: true,
|
|
155
161
|
});
|
|
156
162
|
tasks.push(vitestTask);
|
|
163
|
+
createOrEditViteConfig(host, {
|
|
164
|
+
project: options.projectName,
|
|
165
|
+
includeLib: false,
|
|
166
|
+
includeVitest: true,
|
|
167
|
+
inSourceTests: options.inSourceTests,
|
|
168
|
+
}, true);
|
|
157
169
|
}
|
|
158
170
|
if ((options.bundler === 'vite' || options.unitTestRunner === 'vitest') &&
|
|
159
171
|
options.inSourceTests) {
|
|
160
172
|
host.delete((0, devkit_1.joinPathFragments)(options.appProjectRoot, `src/app/app.element.spec.ts`));
|
|
161
173
|
}
|
|
162
174
|
if (options.linter === 'eslint') {
|
|
163
|
-
const { lintProjectGenerator } = (0, devkit_1.ensurePackage)('@nx/
|
|
175
|
+
const { lintProjectGenerator } = (0, devkit_1.ensurePackage)('@nx/eslint', versions_2.nxVersion);
|
|
164
176
|
const lintTask = await lintProjectGenerator(host, {
|
|
165
177
|
linter: options.linter,
|
|
166
178
|
project: options.projectName,
|