@soleil-se/build-app 2.5.0 → 2.5.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/CHANGELOG.md CHANGED
@@ -4,6 +4,18 @@ title: Changelog
4
4
 
5
5
  Baseras på [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) och använder [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6
6
 
7
+ ## [2.5.2] - 2025-01-22
8
+
9
+ - Använd den fördefinierade inställningen `browser` för klientkod vid module resolution med `@rollup/plugin-node-resolve`.
10
+
11
+ ## [2.5.1] - 2025-12-16
12
+
13
+ - Ta bort dynamisk import av `node:crypto` då dessa importer inte stöds i Rhino.
14
+
15
+ ## [2.5.0] - 2025-10-06
16
+
17
+ - Lägg till stöd för att bygga appar utan en `main.js`-fil, , läs mer i [Ingen main.js](https://docs.soleil.se/build/app/no-main-js).
18
+
7
19
  ## [2.4.1] - 2025-09-26
8
20
 
9
21
  - Byt ut `.replaceAll` till motsvarande `.split().join()` eller `.replace()` för regex på serversidan då det inte stöds i Rhino.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@soleil-se/build-app",
3
3
  "description": "Script for building WebApps, RESTApps and Widgets with Svelte in Sitevision.",
4
- "version": "2.5.0",
4
+ "version": "2.5.2",
5
5
  "bin": {
6
6
  "build-app": "./bin/index.js",
7
7
  "sv-app-build": "./bin/index.js"
@@ -56,8 +56,8 @@
56
56
  "magic-string": "^0.30.19",
57
57
  "svelte-preprocess": "6.0.3",
58
58
  "tslib": "^2.8.1",
59
- "@soleil-se/build-utils": "^1.8.3",
60
- "@soleil-se/build-config": "^1.3.1"
59
+ "@soleil-se/build-config": "^1.4.0",
60
+ "@soleil-se/build-utils": "^1.8.3"
61
61
  },
62
62
  "devDependencies": {
63
63
  "svelte": "^5.39.6",
@@ -4,10 +4,8 @@ import { findUpSync } from 'find-up';
4
4
  export default function getNodeResolvePlugin({ input, context = 'server', debug = false } = {}) {
5
5
  const additionalModulePath = findUpSync('node_modules', { cwd: input, type: 'directory' }) || [];
6
6
 
7
- const mainFields = ['module', 'main'];
8
- if (context === 'client') mainFields.push('browser');
9
7
  return nodeResolve({
10
- mainFields,
8
+ browser: context === 'client',
11
9
  extensions: ['.js', '.mjs', '.json', '.svelte'],
12
10
  modulePaths: [].concat(additionalModulePath),
13
11
  exportConditions: ['svelte', (debug ? 'development' : 'production')],
@@ -17,6 +17,8 @@ export function getReplaceServerPlugin() {
17
17
  "typeof process !== 'undefined' ? process.server : typeof window === 'undefined'": true,
18
18
  'process.server': true,
19
19
  'process.browser': false,
20
+ 'import(\'node:crypto\')': null,
21
+ 'import("node:crypto")': null,
20
22
  preventAssignment: true,
21
23
  delimiters: ['', ''],
22
24
  });