@soleil-se/build-app 2.0.1 → 2.0.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,10 @@ 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.0.2] - 2024-10-28
8
+
9
+ - Gör om variabelnamnen till camelCase i `rollup-plugin-sitevision` för att möjliggöra importer av API:er med punktnotation i namet, exempelvis `IndexUtil.IndexType`.
10
+
7
11
  ## [2.0.1] - 2024-10-28
8
12
 
9
13
  - Ta bort fältet `browser` för `@rollup/plugin-node-resolve` när serverkod bundlas med Rollup.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@soleil-se/build-app",
3
- "version": "2.0.1",
3
+ "version": "2.0.2",
4
4
  "bin": {
5
5
  "build-app": "./bin/index.js",
6
6
  "sv-app-build": "./bin/index.js"
@@ -45,8 +45,8 @@
45
45
  "rollup-plugin-svelte": "7.2.2",
46
46
  "slash": "5.1.0",
47
47
  "svelte-preprocess": "6.0.3",
48
- "@soleil-se/build-config": "1.3.0",
49
- "@soleil-se/build-utils": "1.7.0"
48
+ "@soleil-se/build-utils": "1.7.0",
49
+ "@soleil-se/build-config": "1.3.0"
50
50
  },
51
51
  "devDependencies": {
52
52
  "svelte": "5.1.3"
@@ -1,3 +1,5 @@
1
+ import { camelCase } from 'lodash-es';
2
+
1
3
  export default function sitevision({ context } = {}) {
2
4
  const ignored = [];
3
5
 
@@ -18,7 +20,8 @@ export default function sitevision({ context } = {}) {
18
20
 
19
21
  function getVirtualModule(pkg) {
20
22
  if (context === 'server') {
21
- return `var ${pkg} = require('${pkg}');\nexport default ${pkg};`;
23
+ const variable = camelCase(pkg);
24
+ return `var ${variable} = require('${pkg}');\nexport default ${variable};`;
22
25
  } if (context === 'client') {
23
26
  return `export { default } from '${pkg}';`;
24
27
  }