File tree 5 files changed +31
-83
lines changed
5 files changed +31
-83
lines changed Original file line number Diff line number Diff line change
1
+ ---
2
+ ---
Original file line number Diff line number Diff line change 1
- // This file is a helper for the "subpath-workaround.mjs" script
2
- // We have to polyfill our "exports" subpaths :cry:
1
+ import packageJson from './package.json' with { type : 'json' } ;
3
2
4
- export const subpathNames = [
5
- 'ar-SA' ,
6
- 'cs-CZ' ,
7
- 'da-DK' ,
8
- 'de-DE' ,
9
- 'el-GR' ,
10
- 'en-US' ,
11
- 'es-ES' ,
12
- 'fr-FR' ,
13
- 'fi-FI' ,
14
- 'he-IL' ,
15
- 'is-IS' ,
16
- 'it-IT' ,
17
- 'ja-JP' ,
18
- 'ko-KR' ,
19
- 'mn-MN' ,
20
- 'nb-NO' ,
21
- 'nl-NL' ,
22
- 'nl-BE' ,
23
- 'pl-PL' ,
24
- 'pt-BR' ,
25
- 'pt-PT' ,
26
- 'ro-RO' ,
27
- 'ru-RU' ,
28
- 'sk-SK' ,
29
- 'sv-SE' ,
30
- 'tr-TR' ,
31
- 'uk-UA' ,
32
- 'vi-VN' ,
33
- 'zh-CN' ,
34
- 'zh-TW' ,
35
- 'es-MX' ,
36
- 'bg-BG' ,
37
- 'th-TH' ,
38
- 'ca-ES' ,
39
- 'hu-HU' ,
40
- 'sr-RS' ,
41
- 'hr-HR' ,
42
- ] ;
3
+ /**
4
+ * This file is a helper for the "subpath-workaround.mjs" script.
5
+ * Add your new subpath to package.json#files.
6
+ *
7
+ * When you add an entry to the package.json "files" field, a subfolder will be automatically created with a package.json pointing to that file
8
+ */
9
+
10
+ export const subpathNames = packageJson . files . filter ( k => k !== 'dist' ) ;
43
11
44
12
export const subpathFoldersBarrel = [ ] ;
45
13
Original file line number Diff line number Diff line change 1
- import packageJson from './package.json' assert { type : 'json ' } ;
2
- // This file is a helper for the "subpath-workaround.mjs" script
3
- // We have to polyfill our "exports" subpaths :cry:
1
+ import packageJson from './package.json' with { type : 'json' } ;
4
2
5
- export const subpathNames = Object . keys ( packageJson . exports )
6
- . filter ( k => k . startsWith ( './' ) && k !== './' && k !== './package.json' )
7
- . map ( k => k . replace ( './' , '' ) ) ;
3
+ /**
4
+ * This file is a helper for the "subpath-workaround.mjs" script.
5
+ * Add your new subpath to package.json#files.
6
+ *
7
+ * When you add an entry to the package.json "files" field, a subfolder will be automatically created with a package.json pointing to that file
8
+ */
9
+
10
+ export const subpathNames = packageJson . files . filter ( k => k !== 'dist' ) ;
8
11
9
12
export const subpathFoldersBarrel = [ ] ;
10
13
Original file line number Diff line number Diff line change 44
44
},
45
45
"main" : " ./dist/index.js" ,
46
46
"files" : [
47
- " authorization" ,
48
47
" dist" ,
48
+ " scripts" ,
49
+ " authorization" ,
49
50
" browser" ,
50
51
" callWithRetry" ,
51
52
" color" ,
71
72
" react" ,
72
73
" constants" ,
73
74
" apiUrlFromPublishableKey" ,
74
- " scripts" ,
75
75
" telemetry" ,
76
76
" logger" ,
77
77
" webauthn" ,
Original file line number Diff line number Diff line change 1
- // This file is a helper for the "subpath-workaround.mjs" script
2
- // When adding an entry to "subpathNames" also add it to "files" in package.json
1
+ import packageJson from './package.json' with { type : 'json' } ;
3
2
4
- export const subpathNames = [
5
- 'authorization' ,
6
- 'browser' ,
7
- 'callWithRetry' ,
8
- 'color' ,
9
- 'cookie' ,
10
- 'date' ,
11
- 'deprecated' ,
12
- 'deriveState' ,
13
- 'error' ,
14
- 'file' ,
15
- 'globs' ,
16
- 'handleValueOrFn' ,
17
- 'isomorphicAtob' ,
18
- 'isomorphicBtoa' ,
19
- 'keys' ,
20
- 'loadClerkJsScript' ,
21
- 'loadScript' ,
22
- 'localStorageBroadcastChannel' ,
23
- 'poller' ,
24
- 'proxy' ,
25
- 'underscore' ,
26
- 'url' ,
27
- 'versionSelector' ,
28
- 'constants' ,
29
- 'apiUrlFromPublishableKey' ,
30
- 'telemetry' ,
31
- 'logger' ,
32
- 'webauthn' ,
33
- 'router' ,
34
- 'pathToRegexp' ,
35
- ] ;
3
+ /**
4
+ * This file is a helper for the "subpath-workaround.mjs" script.
5
+ * Add your new subpath to package.json#files.
6
+ *
7
+ * When you add an entry to the package.json "files" field, a subfolder will be automatically created with a package.json pointing to that file
8
+ */
9
+
10
+ export const subpathNames = packageJson . files . filter ( k => ! [ 'dist' , 'scripts' , 'react' ] . includes ( k ) ) ;
36
11
37
12
export const subpathFoldersBarrel = [ 'react' ] ;
38
13
You can’t perform that action at this time.
0 commit comments