Skip to content

Commit

Permalink
Enable Node16 module resolution
Browse files Browse the repository at this point in the history
  • Loading branch information
Mrtenz committed Sep 9, 2024
1 parent 80fc48f commit 5e3acf1
Show file tree
Hide file tree
Showing 8 changed files with 10 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"url": "https://github.com/MetaMask/snaps.git"
},
"source": {
"shasum": "86NLlsPJvWJxQuiDRc6479u6RvMaCFIK8GNVpTdcPjI=",
"shasum": "sMwND6AEkeKsDGmco0iXwfoit1cF+5ma0IiPttevwlE=",
"location": {
"npm": {
"filePath": "dist/bundle.js",
Expand Down
2 changes: 1 addition & 1 deletion packages/examples/packages/browserify/snap.manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"url": "https://github.com/MetaMask/snaps.git"
},
"source": {
"shasum": "BXW4yp9Qs+yCSXZXMJfvEIjY0epnS2yhzcHZ8kAb0B0=",
"shasum": "i4dr8xQTfJM87uTLP9CkRz+ezhPSU1xLl9EeSXuQYuI=",
"location": {
"npm": {
"filePath": "dist/bundle.js",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,10 @@
// eslint-disable-next-line import/unambiguous
declare module '*.svg' {
const content: string;
export default content;
}

declare module '*.png' {
const content: string;
export default content;
}

declare module '*.jpg' {
declare module '*.svg' {
const content: string;
export default content;
}
3 changes: 2 additions & 1 deletion packages/snaps-cli/tsconfig.build.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
"compilerOptions": {
"baseUrl": "./",
"outDir": "./dist",
"rootDir": "./src"
"rootDir": "./src",
"skipLibCheck": true
},
"include": ["./src"],
"exclude": [
Expand Down
3 changes: 2 additions & 1 deletion packages/snaps-cli/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
{
"extends": "../../tsconfig.packages.json",
"compilerOptions": {
"baseUrl": "./"
"baseUrl": "./",
"skipLibCheck": true
},
"include": ["./src", "./src/**/*.json", "jest.setup.ts", "package.json"],
"references": [
Expand Down
1 change: 0 additions & 1 deletion packages/snaps-sdk/src/types/index.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// This is intentionally imported, rather than re-exported.
/* eslint-disable import/no-unassigned-import */
import './global';
import './images';
/* eslint-enable import/no-unassigned-import */

export * from './caip';
Expand Down
3 changes: 1 addition & 2 deletions tsconfig.packages.build.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
"declaration": true,
"emitDeclarationOnly": true,
"inlineSources": true,
"sourceMap": true,
"module": "ES2020"
"sourceMap": true
}
}
4 changes: 2 additions & 2 deletions tsconfig.packages.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
"jsx": "react-jsx",
"jsxImportSource": "@metamask/snaps-sdk",
"lib": ["DOM", "ES2020"],
"module": "CommonJS",
"moduleResolution": "node",
"module": "Node16",
"moduleResolution": "Node16",
"paths": {
"@metamask/*/test-utils": ["../*/src/test-utils"],
"@metamask/*/node": ["../*/src/node"],
Expand Down

0 comments on commit 5e3acf1

Please sign in to comment.