@nx/nuxt 20.0.8 → 20.1.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/nuxt",
3
- "version": "20.0.8",
3
+ "version": "20.1.0-beta.0",
4
4
  "private": false,
5
5
  "description": "The Nuxt plugin for Nx contains executors and generators for managing Nuxt applications and libraries within an Nx workspace. It provides:\n\n\n- Integration with libraries such as Vitest, Playwright, Cypress, and Storybook.\n\n- Generators for applications, libraries, and more.\n\n- Library build support for publishing packages to npm or other registries.\n\n- Utilities for automatic workspace refactoring.",
6
6
  "repository": {
@@ -31,14 +31,16 @@
31
31
  "dependencies": {
32
32
  "tslib": "^2.3.0",
33
33
  "@nuxt/kit": "^3.10.0",
34
- "@nx/devkit": "20.0.8",
35
- "@nx/js": "20.0.8",
36
- "@nx/eslint": "20.0.8",
37
- "@nx/vue": "20.0.8",
38
- "@nx/vite": "20.0.8",
34
+ "@nx/devkit": "20.1.0-beta.0",
35
+ "@nx/js": "20.1.0-beta.0",
36
+ "@nx/eslint": "20.1.0-beta.0",
37
+ "@nx/vue": "20.1.0-beta.0",
38
+ "@nx/vite": "20.1.0-beta.0",
39
39
  "@phenomnomnominal/tsquery": "~5.0.1"
40
40
  },
41
- "peerDependencies": {},
41
+ "peerDependencies": {
42
+ "@nuxt/schema": "^3.10.0"
43
+ },
42
44
  "publishConfig": {
43
45
  "access": "public"
44
46
  },
@@ -19,9 +19,9 @@ export default defineNuxtConfig({
19
19
  imports: {
20
20
  autoImport: true,
21
21
  },
22
- <% if (style !== 'none') { %>
22
+ <%_ if (style !== 'none') { _%>
23
23
  css: ['~/assets/css/styles.<%= style %>'],
24
- <% } %>
24
+ <%_ } _%>
25
25
  vite: {
26
26
  plugins: [
27
27
  nxViteTsPaths()
@@ -2,13 +2,14 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.createNodes = exports.createDependencies = void 0;
4
4
  const devkit_1 = require("@nx/devkit");
5
- const path_1 = require("path");
6
- const cache_directory_1 = require("nx/src/utils/cache-directory");
5
+ const config_utils_1 = require("@nx/devkit/src/utils/config-utils");
7
6
  const get_named_inputs_1 = require("@nx/devkit/src/utils/get-named-inputs");
8
- const fs_1 = require("fs");
9
7
  const calculate_hash_for_create_nodes_1 = require("@nx/devkit/src/utils/calculate-hash-for-create-nodes");
8
+ const cache_directory_1 = require("nx/src/utils/cache-directory");
10
9
  const js_1 = require("@nx/js");
11
- const config_utils_1 = require("@nx/devkit/src/utils/config-utils");
10
+ const path_1 = require("path");
11
+ const fs_1 = require("fs");
12
+ const executor_utils_1 = require("../utils/executor-utils");
12
13
  const cachePath = (0, path_1.join)(cache_directory_1.workspaceDataDirectory, 'nuxt.hash');
13
14
  const targetsCache = readTargetsCache();
14
15
  function readTargetsCache() {
@@ -118,8 +119,15 @@ function buildStaticTarget(buildStaticTargetName, namedInputs, buildOutputs, pro
118
119
  return targetConfig;
119
120
  }
120
121
  async function getInfoFromNuxtConfig(configFilePath, context, projectRoot) {
121
- // TODO(Colum): Once plugins are isolated we can go back to @nuxt/kit since each plugin will be run in its own worker.
122
- const config = await (0, config_utils_1.loadConfigFile)((0, path_1.join)(context.workspaceRoot, configFilePath));
122
+ let config;
123
+ if (process.env.NX_ISOLATE_PLUGINS !== 'false') {
124
+ config = await (await (0, executor_utils_1.loadNuxtKitDynamicImport)()).loadNuxtConfig({
125
+ configFile: configFilePath,
126
+ });
127
+ }
128
+ else {
129
+ config = await (0, config_utils_1.loadConfigFile)((0, path_1.join)(context.workspaceRoot, configFilePath));
130
+ }
123
131
  return {
124
132
  buildDir: config?.buildDir ??
125
133
  // Match .nuxt default build dir from '@nuxt/schema'