@arcgis/node-toolkit 5.2.0-next.124 → 5.2.0-next.126

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.
@@ -3,6 +3,10 @@ import { externalizeDependencies } from "./externalizeDependenciesPlugin.js";
3
3
  function shouldSkip(id) {
4
4
  return id.includes("__test") || id.includes(".e2e.") || id.includes(".spec.") || id.includes(".test.") || id.includes(".stories.");
5
5
  }
6
+ const hashlessOutputNames = {
7
+ assetFileNames: "assets/[name][extname]",
8
+ chunkFileNames: "chunks/[name].js"
9
+ };
6
10
  function vitePresetPlugin({ dtsOptions = {}, externalize, bundleIn, isApplication } = {
7
11
  externalize: [],
8
12
  dtsOptions: {}
@@ -13,13 +17,18 @@ function vitePresetPlugin({ dtsOptions = {}, externalize, bundleIn, isApplicatio
13
17
  return [
14
18
  {
15
19
  name: "vite-preset-config",
16
- config({ build: { target } = {} }, env) {
20
+ config(config, env) {
17
21
  command = env.command;
22
+ const { rollupOptions, ssr, target } = config.build ?? {};
23
+ const isBrowserApplication = isApplication && !ssr && !env.isSsrBuild;
24
+ const output = rollupOptions?.output;
25
+ const hashlessOutput = Array.isArray(output) ? output.map((entry) => ({ ...hashlessOutputNames, ...entry })) : { ...hashlessOutputNames, ...output };
18
26
  return {
19
27
  build: {
20
28
  // REFACTOR: get this from tsconfig
21
29
  // It's a best practice to let the final bundler down-level as needed.
22
- target: target ?? "es2024"
30
+ target: target ?? "es2024",
31
+ rollupOptions: isBrowserApplication ? void 0 : { output: hashlessOutput }
23
32
  },
24
33
  define: env.mode === "test" ? {
25
34
  "process.env.ESRI_INTERNAL": true
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arcgis/node-toolkit",
3
- "version": "5.2.0-next.124",
3
+ "version": "5.2.0-next.126",
4
4
  "description": "Collection of common internal build-time patterns and utilities for ArcGIS Maps SDK for JavaScript components.",
5
5
  "homepage": "https://developers.arcgis.com/javascript/latest/",
6
6
  "type": "module",