@nx/web 18.0.0-beta.1 → 18.0.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.
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nx/web",
|
|
3
|
-
"version": "18.0.0-beta.
|
|
3
|
+
"version": "18.0.0-beta.2",
|
|
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": "18.0.0-beta.
|
|
38
|
-
"@nx/js": "18.0.0-beta.
|
|
39
|
-
"@nrwl/web": "18.0.0-beta.
|
|
37
|
+
"@nx/devkit": "18.0.0-beta.2",
|
|
38
|
+
"@nx/js": "18.0.0-beta.2",
|
|
39
|
+
"@nrwl/web": "18.0.0-beta.2"
|
|
40
40
|
},
|
|
41
41
|
"publishConfig": {
|
|
42
42
|
"access": "public"
|
|
@@ -31,6 +31,7 @@ function createApplicationFiles(tree, options) {
|
|
|
31
31
|
rootTsConfigPath: (0, js_1.getRelativePathToRootTsConfig)(tree, options.appProjectRoot),
|
|
32
32
|
webpackPluginOptions: (0, has_webpack_plugin_1.hasWebpackPlugin)(tree)
|
|
33
33
|
? {
|
|
34
|
+
compiler: options.compiler,
|
|
34
35
|
target: 'web',
|
|
35
36
|
outputPath: (0, devkit_1.joinPathFragments)('dist', options.appProjectRoot != '.'
|
|
36
37
|
? options.appProjectRoot
|
|
@@ -67,6 +68,7 @@ async function setupBundler(tree, options) {
|
|
|
67
68
|
devServer: true,
|
|
68
69
|
webpackConfig: (0, devkit_1.joinPathFragments)(options.appProjectRoot, 'webpack.config.js'),
|
|
69
70
|
skipFormat: true,
|
|
71
|
+
addPlugin: options.addPlugin,
|
|
70
72
|
});
|
|
71
73
|
const project = (0, devkit_1.readProjectConfiguration)(tree, options.projectName);
|
|
72
74
|
if (project.targets.build) {
|
|
@@ -141,6 +143,7 @@ function setDefaults(tree, options) {
|
|
|
141
143
|
}
|
|
142
144
|
async function applicationGenerator(host, schema) {
|
|
143
145
|
return await applicationGeneratorInternal(host, {
|
|
146
|
+
addPlugin: false,
|
|
144
147
|
projectNameAndRootFormat: 'derived',
|
|
145
148
|
...schema,
|
|
146
149
|
});
|
|
@@ -178,6 +181,7 @@ async function applicationGeneratorInternal(host, schema) {
|
|
|
178
181
|
includeVitest: options.unitTestRunner === 'vitest',
|
|
179
182
|
inSourceTests: options.inSourceTests,
|
|
180
183
|
skipFormat: true,
|
|
184
|
+
addPlugin: options.addPlugin,
|
|
181
185
|
});
|
|
182
186
|
tasks.push(viteTask);
|
|
183
187
|
createOrEditViteConfig(host, {
|
|
@@ -195,6 +199,7 @@ async function applicationGeneratorInternal(host, schema) {
|
|
|
195
199
|
coverageProvider: 'v8',
|
|
196
200
|
inSourceTests: options.inSourceTests,
|
|
197
201
|
skipFormat: true,
|
|
202
|
+
addPlugin: options.addPlugin,
|
|
198
203
|
});
|
|
199
204
|
tasks.push(vitestTask);
|
|
200
205
|
createOrEditViteConfig(host, {
|
|
@@ -219,6 +224,7 @@ async function applicationGeneratorInternal(host, schema) {
|
|
|
219
224
|
unitTestRunner: options.unitTestRunner,
|
|
220
225
|
skipFormat: true,
|
|
221
226
|
setParserOptionsProject: options.setParserOptionsProject,
|
|
227
|
+
addPlugin: options.addPlugin,
|
|
222
228
|
});
|
|
223
229
|
tasks.push(lintTask);
|
|
224
230
|
}
|
|
@@ -261,6 +267,7 @@ async function applicationGeneratorInternal(host, schema) {
|
|
|
261
267
|
setParserOptionsProject: options.setParserOptionsProject,
|
|
262
268
|
webServerCommand: `${(0, devkit_1.getPackageManagerCommand)().exec} nx serve ${options.name}`,
|
|
263
269
|
webServerAddress: 'http://localhost:4200',
|
|
270
|
+
addPlugin: options.addPlugin,
|
|
264
271
|
});
|
|
265
272
|
tasks.push(playwrightTask);
|
|
266
273
|
}
|
|
@@ -272,6 +279,7 @@ async function applicationGeneratorInternal(host, schema) {
|
|
|
272
279
|
setupFile: 'web-components',
|
|
273
280
|
compiler: options.compiler,
|
|
274
281
|
skipFormat: true,
|
|
282
|
+
addPlugin: options.addPlugin,
|
|
275
283
|
});
|
|
276
284
|
tasks.push(jestTask);
|
|
277
285
|
}
|
|
@@ -312,6 +320,7 @@ async function normalizeOptions(host, options) {
|
|
|
312
320
|
callingGenerator: '@nx/web:application',
|
|
313
321
|
});
|
|
314
322
|
options.projectNameAndRootFormat = projectNameAndRootFormat;
|
|
323
|
+
options.addPlugin ??= process.env.NX_ADD_PLUGINS !== 'false';
|
|
315
324
|
const e2eProjectName = `${appProjectName}-e2e`;
|
|
316
325
|
const e2eProjectRoot = `${appProjectRoot}-e2e`;
|
|
317
326
|
const npmScope = (0, get_npm_scope_1.getNpmScope)(host);
|
|
@@ -12,6 +12,7 @@ module.exports = {
|
|
|
12
12
|
plugins: [
|
|
13
13
|
new NxWebpackPlugin({
|
|
14
14
|
tsConfig: '<%= webpackPluginOptions.tsConfig %>',
|
|
15
|
+
compiler: '<%= webpackPluginOptions.compiler %>',
|
|
15
16
|
main: '<%= webpackPluginOptions.main %>',
|
|
16
17
|
index: '<%= webpackPluginOptions.index %>',
|
|
17
18
|
baseHref: '<%= webpackPluginOptions.baseHref %>',
|