Skip to content

Commit e86d1a4

Browse files
Fix types generation
1 parent c280ba3 commit e86d1a4

File tree

4 files changed

+127
-3
lines changed

4 files changed

+127
-3
lines changed

package.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
{
22
"name": "@openrouter/markdown-wasm",
3-
"version": "0.1.0",
3+
"version": "0.1.1",
44
"packageManager": "[email protected]+sha512.c753b6c3ad7afa13af388fa6d808035a008e30ea9993f58c6663e2bc5ff21679aa834db094987129aa4d488b86df57f7b634981b2f827cdcacc698cc0cfb88af",
5-
"module": "dist/main.mjs",
5+
"module": "dist/index.mjs",
6+
"types": "dist/index.d.ts",
67
"files": [
78
"/dist"
89
],
@@ -17,6 +18,7 @@
1718
"@types/node": "^22.13.4",
1819
"@types/webpack": "^5.28.5",
1920
"@wasm-tool/wasm-pack-plugin": "^1.7.0",
21+
"bundle-declarations-webpack-plugin": "^5.1.1",
2022
"cross-env": "^7.0.3",
2123
"ts-loader": "^9.5.2",
2224
"ts-node": "^10.9.2",

pnpm-lock.yaml

Lines changed: 117 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tsconfig.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
{
22
"extends": "./tsconfig.base.json",
33
"include": ["src/**/*.ts"],
4+
"compilerOptions": {
5+
"declaration": true
6+
},
47
"ts-node": {
58
"compilerOptions": {
69
"module": "commonjs"

webpack.config.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import type webpack from "webpack";
22
import path from "path";
33
import WasmPackPlugin from "@wasm-tool/wasm-pack-plugin";
4+
import BundleDeclarationsWebpackPlugin from "bundle-declarations-webpack-plugin";
45

56
// Needed to use build-std on stable rust
67
process.env.RUSTC_BOOTSTRAP = "1";
@@ -11,7 +12,7 @@ export default {
1112
entry: "./src/index.ts",
1213
output: {
1314
path: path.resolve(__dirname, "dist"),
14-
filename: "main.mjs",
15+
filename: "index.mjs",
1516
clean: true,
1617

1718
library: {
@@ -37,6 +38,7 @@ export default {
3738
extraArgs:
3839
"--no-pack --target bundler . -Z build-std=panic_abort,std -Z build-std-features=panic_immediate_abort",
3940
}),
41+
new BundleDeclarationsWebpackPlugin(),
4042
],
4143

4244
experiments: {

0 commit comments

Comments
 (0)