Skip to content

Commit 4aabd4e

Browse files
committed
revert platform
1 parent 259a22a commit 4aabd4e

File tree

3 files changed

+14
-7
lines changed

3 files changed

+14
-7
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# @code.store/arcxp-sdk-ts
22

3+
## 5.1.7
4+
5+
### Patch Changes
6+
7+
- Revert platform modules
8+
39
## 5.1.6
410

511
### Patch Changes

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@code.store/arcxp-sdk-ts",
3-
"version": "5.1.6",
3+
"version": "5.1.7",
44
"description": "A strongly typed set of ArcXP API's and utilities reduce the amount of work required to develop with ArcXP, starting with reducing the boilerplate code you have to write.",
55
"type": "module",
66
"main": "./dist/index.js",

src/lib/platform/node.ts

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
1-
const importNodeModule = async (moduleId: string) => await import(moduleId);
1+
import fs from 'node:fs';
2+
import path from 'node:path';
3+
import FormData from 'form-data';
24

35
const modules = {
4-
// make it like that so static analyzer of webpack won't bundle it
5-
fs: () => importNodeModule('node:fs') as Promise<typeof import('node:fs')>,
6-
path: () => importNodeModule('node:path') as Promise<typeof import('node:path')>,
7-
form_data: () => importNodeModule('form-data') as Promise<typeof import('form-data')>,
6+
fs: () => Promise.resolve(fs),
7+
path: () => Promise.resolve(path),
8+
form_data: () => Promise.resolve(FormData),
89
};
910

10-
export default modules;
11+
export default modules;

0 commit comments

Comments
 (0)