@soleil-se/build-app 2.0.0 → 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,14 @@ 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
|
+
|
|
11
|
+
## [2.0.1] - 2024-10-28
|
|
12
|
+
|
|
13
|
+
- Ta bort fältet `browser` för `@rollup/plugin-node-resolve` när serverkod bundlas med Rollup.
|
|
14
|
+
|
|
7
15
|
## [2.0.0] - 2024-10-21
|
|
8
16
|
|
|
9
17
|
- Ta bort stödet för WebApps 1.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@soleil-se/build-app",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.2",
|
|
4
4
|
"bin": {
|
|
5
5
|
"build-app": "./bin/index.js",
|
|
6
6
|
"sv-app-build": "./bin/index.js"
|
|
@@ -14,8 +14,8 @@
|
|
|
14
14
|
},
|
|
15
15
|
"homepage": "https://docs.soleil.se/build/app",
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@babel/core": "7.
|
|
18
|
-
"@babel/preset-env": "7.
|
|
17
|
+
"@babel/core": "7.26.0",
|
|
18
|
+
"@babel/preset-env": "7.26.0",
|
|
19
19
|
"@rollup/plugin-alias": "5.1.1",
|
|
20
20
|
"@rollup/plugin-babel": "6.0.4",
|
|
21
21
|
"@rollup/plugin-commonjs": "28.0.1",
|
|
@@ -39,17 +39,17 @@
|
|
|
39
39
|
"postcss-pxtorem": "6.1.0",
|
|
40
40
|
"pretty-bytes": "6.1.1",
|
|
41
41
|
"prompts": "2.4.2",
|
|
42
|
-
"rollup": "4.24.
|
|
42
|
+
"rollup": "4.24.2",
|
|
43
43
|
"rollup-plugin-postcss": "4.0.2",
|
|
44
44
|
"rollup-plugin-string": "3.0.0",
|
|
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-
|
|
49
|
-
"@soleil-se/build-
|
|
48
|
+
"@soleil-se/build-utils": "1.7.0",
|
|
49
|
+
"@soleil-se/build-config": "1.3.0"
|
|
50
50
|
},
|
|
51
51
|
"devDependencies": {
|
|
52
|
-
"svelte": "5.
|
|
52
|
+
"svelte": "5.1.3"
|
|
53
53
|
},
|
|
54
54
|
"scripts": {},
|
|
55
55
|
"description": "Script for building WebApps, RESTApps and Widgets with Svelte in Sitevision.",
|
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
import nodeResolve from '@rollup/plugin-node-resolve';
|
|
2
2
|
import { findUpSync } from 'find-up';
|
|
3
3
|
|
|
4
|
-
export default function getNodeResolvePlugin({ input } = {}) {
|
|
4
|
+
export default function getNodeResolvePlugin({ input, context = 'server' } = {}) {
|
|
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
10
|
return nodeResolve({
|
|
8
|
-
mainFields
|
|
11
|
+
mainFields,
|
|
9
12
|
extensions: ['.js', '.mjs', '.json', '.svelte'],
|
|
10
13
|
modulePaths: [].concat(additionalModulePath),
|
|
11
14
|
exportConditions: ['svelte'],
|
package/rollup/client.js
CHANGED
|
@@ -41,7 +41,7 @@ export default function rollupClient({
|
|
|
41
41
|
sitevisionPlugin({ context: 'client' }),
|
|
42
42
|
getReplaceClientPlugin(),
|
|
43
43
|
getAliasClientPlugin(),
|
|
44
|
-
getNodeResolvePlugin({ input }),
|
|
44
|
+
getNodeResolvePlugin({ input, context: 'client' }),
|
|
45
45
|
getCommonjsPlugin(),
|
|
46
46
|
await getSveltePlugin({ input, debug, extractCss, hydratable }),
|
|
47
47
|
getPostcssPlugin({ extractCss, debug }),
|
|
@@ -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
|
-
|
|
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
|
}
|