@soleil-se/build-app 2.1.1 → 2.1.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 +4 -0
- package/package.json +1 -1
- package/rollup/api/getNodeResolvePlugin.js +2 -3
- package/rollup/client.js +1 -1
- package/rollup/server.js +1 -1
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.1.2] - 2024-11-28
|
|
8
|
+
|
|
9
|
+
- Lägg till import condition för `development` eller `production` för `@rollup/plugin-node-resolve`.
|
|
10
|
+
|
|
7
11
|
## [2.1.1] - 2024-11-19
|
|
8
12
|
|
|
9
13
|
- Justera sökvägar för watchern.
|
package/package.json
CHANGED
|
@@ -1,17 +1,16 @@
|
|
|
1
1
|
import nodeResolve from '@rollup/plugin-node-resolve';
|
|
2
2
|
import { findUpSync } from 'find-up';
|
|
3
3
|
|
|
4
|
-
export default function getNodeResolvePlugin({ input, context = 'server' } = {}) {
|
|
4
|
+
export default function getNodeResolvePlugin({ input, context = 'server', debug = false } = {}) {
|
|
5
5
|
const additionalModulePath = findUpSync('node_modules', { cwd: input, type: 'directory' }) || [];
|
|
6
6
|
|
|
7
7
|
const mainFields = ['module', 'main'];
|
|
8
8
|
if (context === 'client') mainFields.push('browser');
|
|
9
|
-
|
|
10
9
|
return nodeResolve({
|
|
11
10
|
mainFields,
|
|
12
11
|
extensions: ['.js', '.mjs', '.json', '.svelte'],
|
|
13
12
|
modulePaths: [].concat(additionalModulePath),
|
|
14
|
-
exportConditions: ['svelte'],
|
|
13
|
+
exportConditions: ['svelte', (debug ? 'development' : 'production')],
|
|
15
14
|
dedupe(importee) {
|
|
16
15
|
return importee === 'svelte' || importee.startsWith('svelte/');
|
|
17
16
|
},
|
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, context: 'client' }),
|
|
44
|
+
getNodeResolvePlugin({ input, context: 'client', debug }),
|
|
45
45
|
getCommonjsPlugin(),
|
|
46
46
|
await getSveltePlugin({ input, debug, extractCss, hydratable }),
|
|
47
47
|
getPostcssPlugin({ extractCss, debug }),
|
package/rollup/server.js
CHANGED
|
@@ -35,7 +35,7 @@ export default function rollupServer({
|
|
|
35
35
|
sitevision({ context: 'server' }),
|
|
36
36
|
json(),
|
|
37
37
|
getStringPlugin(),
|
|
38
|
-
getNodeResolvePlugin({ input }),
|
|
38
|
+
getNodeResolvePlugin({ input, debug }),
|
|
39
39
|
getCommonjsPlugin(),
|
|
40
40
|
await getSveltePlugin({ input, extractCss, ssr: true }),
|
|
41
41
|
getPostcssPlugin({ extractCss, debug }),
|