-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: "types" in package.json exports (#36)
- Loading branch information
Showing
5 changed files
with
22 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
module.exports = require("../dist/index"); | ||
module.exports = require("../dist/index").default; | ||
module.exports.default = require("../dist/index").default; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
import type _default from "../dist/index.d.ts"; | ||
declare const _export: typeof _default & { default: typeof _default }; | ||
export = _export; |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,12 +2,17 @@ | |
"name": "vite-plugin-wasm", | ||
"version": "3.2.2", | ||
"description": "Add WebAssembly ESM integration (aka. Webpack's `asyncWebAssembly`) to Vite and support `wasm-pack` generated modules.", | ||
"types": "./dist/index.d.ts", | ||
"main": "./dist/index.js", | ||
"types": "./exports/require.d.cts", | ||
"main": "./exports/require.cjs", | ||
"exports": { | ||
"types": "./exports/types.d.ts", | ||
"import": "./exports/import.mjs", | ||
"require": "./exports/require.cjs" | ||
"import": { | ||
"types": "./dist/index.d.ts", | ||
"default": "./exports/import.mjs" | ||
}, | ||
"require": { | ||
"types": "./exports/require.d.cts", | ||
"default": "./exports/require.cjs" | ||
} | ||
}, | ||
"repository": "https://github.com/Menci/vite-plugin-wasm", | ||
"author": "Menci <[email protected]>", | ||
|
@@ -24,7 +29,7 @@ | |
"scripts": { | ||
"build": "tsc", | ||
"test": "cross-env NODE_NO_WARNINGS=1 NODE_OPTIONS=--experimental-vm-modules jest --verbose --coverage --forceExit", | ||
"format": "prettier --write '**/*.{mjs,cjs,js,ts}'", | ||
"format": "prettier --write '**/*.{mjs,cjs,js,mts,cts,ts}'", | ||
"pretest": "yarn --cwd e2e && playwright install firefox" | ||
}, | ||
"devDependencies": { | ||
|