@nx/web 20.5.0-beta.3 → 20.5.0-canary.20250128-e0c49d3
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": "20.5.0-
|
|
3
|
+
"version": "20.5.0-canary.20250128-e0c49d3",
|
|
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, Playwright, 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": {
|
|
@@ -35,8 +35,8 @@
|
|
|
35
35
|
"http-server": "^14.1.0",
|
|
36
36
|
"picocolors": "^1.1.0",
|
|
37
37
|
"tslib": "^2.3.0",
|
|
38
|
-
"@nx/devkit": "20.5.0-
|
|
39
|
-
"@nx/js": "20.5.0-
|
|
38
|
+
"@nx/devkit": "20.5.0-canary.20250128-e0c49d3",
|
|
39
|
+
"@nx/js": "20.5.0-canary.20250128-e0c49d3"
|
|
40
40
|
},
|
|
41
41
|
"publishConfig": {
|
|
42
42
|
"access": "public"
|
|
@@ -29,22 +29,19 @@ function createApplicationFiles(tree, options) {
|
|
|
29
29
|
});
|
|
30
30
|
}
|
|
31
31
|
else {
|
|
32
|
-
const rootOffset = (0, devkit_1.offsetFromRoot)(options.appProjectRoot);
|
|
33
32
|
(0, devkit_1.generateFiles)(tree, (0, path_1.join)(__dirname, './files/app-webpack'), options.appProjectRoot, {
|
|
34
33
|
...options,
|
|
35
34
|
...(0, devkit_1.names)(options.name),
|
|
36
35
|
tmpl: '',
|
|
37
|
-
offsetFromRoot:
|
|
36
|
+
offsetFromRoot: (0, devkit_1.offsetFromRoot)(options.appProjectRoot),
|
|
38
37
|
rootTsConfigPath,
|
|
39
38
|
webpackPluginOptions: (0, has_webpack_plugin_1.hasWebpackPlugin)(tree)
|
|
40
39
|
? {
|
|
41
40
|
compiler: options.compiler,
|
|
42
41
|
target: 'web',
|
|
43
|
-
outputPath: options.
|
|
44
|
-
?
|
|
45
|
-
:
|
|
46
|
-
? options.appProjectRoot
|
|
47
|
-
: options.projectName),
|
|
42
|
+
outputPath: (0, devkit_1.joinPathFragments)('dist', options.appProjectRoot != '.'
|
|
43
|
+
? options.appProjectRoot
|
|
44
|
+
: options.projectName),
|
|
48
45
|
tsConfig: './tsconfig.app.json',
|
|
49
46
|
main: './src/main.ts',
|
|
50
47
|
assets: ['./src/favicon.ico', './src/assets'],
|
|
@@ -103,7 +100,7 @@ async function setupBundler(tree, options) {
|
|
|
103
100
|
addPlugin: options.addPlugin,
|
|
104
101
|
});
|
|
105
102
|
const project = (0, devkit_1.readProjectConfiguration)(tree, options.projectName);
|
|
106
|
-
if (project.targets
|
|
103
|
+
if (project.targets.build) {
|
|
107
104
|
const prodConfig = project.targets.build.configurations.production;
|
|
108
105
|
const buildOptions = project.targets.build.options;
|
|
109
106
|
buildOptions.assets = assets;
|
|
@@ -215,21 +212,6 @@ async function applicationGeneratorInternal(host, schema) {
|
|
|
215
212
|
await setupBundler(host, options);
|
|
216
213
|
}
|
|
217
214
|
createApplicationFiles(host, options);
|
|
218
|
-
if (options.linter === 'eslint') {
|
|
219
|
-
const { lintProjectGenerator } = (0, devkit_1.ensurePackage)('@nx/eslint', versions_2.nxVersion);
|
|
220
|
-
const lintTask = await lintProjectGenerator(host, {
|
|
221
|
-
linter: options.linter,
|
|
222
|
-
project: options.projectName,
|
|
223
|
-
tsConfigPaths: [
|
|
224
|
-
(0, devkit_1.joinPathFragments)(options.appProjectRoot, 'tsconfig.app.json'),
|
|
225
|
-
],
|
|
226
|
-
unitTestRunner: options.unitTestRunner,
|
|
227
|
-
skipFormat: true,
|
|
228
|
-
setParserOptionsProject: options.setParserOptionsProject,
|
|
229
|
-
addPlugin: options.addPlugin,
|
|
230
|
-
});
|
|
231
|
-
tasks.push(lintTask);
|
|
232
|
-
}
|
|
233
215
|
if (options.bundler === 'vite') {
|
|
234
216
|
const { viteConfigurationGenerator, createOrEditViteConfig } = (0, devkit_1.ensurePackage)('@nx/vite', versions_2.nxVersion);
|
|
235
217
|
// We recommend users use `import.meta.env.MODE` and other variables in their code to differentiate between production and development.
|
|
@@ -277,6 +259,21 @@ async function applicationGeneratorInternal(host, schema) {
|
|
|
277
259
|
options.inSourceTests) {
|
|
278
260
|
host.delete((0, devkit_1.joinPathFragments)(options.appProjectRoot, `src/app/app.element.spec.ts`));
|
|
279
261
|
}
|
|
262
|
+
if (options.linter === 'eslint') {
|
|
263
|
+
const { lintProjectGenerator } = (0, devkit_1.ensurePackage)('@nx/eslint', versions_2.nxVersion);
|
|
264
|
+
const lintTask = await lintProjectGenerator(host, {
|
|
265
|
+
linter: options.linter,
|
|
266
|
+
project: options.projectName,
|
|
267
|
+
tsConfigPaths: [
|
|
268
|
+
(0, devkit_1.joinPathFragments)(options.appProjectRoot, 'tsconfig.app.json'),
|
|
269
|
+
],
|
|
270
|
+
unitTestRunner: options.unitTestRunner,
|
|
271
|
+
skipFormat: true,
|
|
272
|
+
setParserOptionsProject: options.setParserOptionsProject,
|
|
273
|
+
addPlugin: options.addPlugin,
|
|
274
|
+
});
|
|
275
|
+
tasks.push(lintTask);
|
|
276
|
+
}
|
|
280
277
|
const nxJson = (0, devkit_1.readNxJson)(host);
|
|
281
278
|
let hasPlugin;
|
|
282
279
|
let buildPlugin;
|