@nx/web 20.4.4 → 20.5.0-beta.0

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.4.4",
3
+ "version": "20.5.0-beta.0",
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.4.4",
39
- "@nx/js": "20.4.4"
38
+ "@nx/devkit": "20.5.0-beta.0",
39
+ "@nx/js": "20.5.0-beta.0"
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: rootOffset,
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.isUsingTsSolutionConfig
44
- ? 'dist'
45
- : (0, devkit_1.joinPathFragments)(rootOffset, 'dist', options.appProjectRoot !== '.'
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?.build) {
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;
@@ -4,7 +4,7 @@ const { join } = require('path');
4
4
 
5
5
  module.exports = {
6
6
  output: {
7
- path: join(__dirname, '<%= webpackPluginOptions.outputPath %>'),
7
+ path: join(__dirname, '<%= offsetFromRoot %><%= webpackPluginOptions.outputPath %>'),
8
8
  },
9
9
  devServer: {
10
10
  port: 4200