Skip to content

Commit

Permalink
fix: dist with types.d.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
X3ZvaWQ committed Jan 27, 2024
1 parent 1ba90a7 commit 8bd63fb
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "wasmoon-lua5.1",
"version": "1.16.3",
"version": "1.16.4",
"description": "A real lua 5.1 VM with JS bindings made with webassembly",
"main": "dist/index.js",
"scripts": {
Expand Down Expand Up @@ -60,7 +60,7 @@
"rollup": "4.7.0",
"rollup-plugin-copy": "3.5.0",
"tslib": "2.6.2",
"typescript": "5.3.3"
"typescript": "^5.3.3"
},
"dependencies": {
"@types/emscripten": "^1.39.10",
Expand Down
9 changes: 8 additions & 1 deletion rollup.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,15 @@ const production = !process.env.ROLLUP_WATCH;

export default {
input: './src/index.ts',
external: ['lodash', 'module'],
output: {
file: 'dist/index.js',
format: 'umd',
name: 'wasmoon',
sourcemap: !production,
globals: {
lodash: 'lodash',
},
},
plugins: [
{
Expand All @@ -32,7 +36,10 @@ export default {
outputToFilesystem: true,
}),
copy({
targets: [{ src: 'build/liblua5.1.wasm', dest: 'dist' }],
targets: [
{ src: 'build/liblua5.1.wasm', dest: 'dist' },
{ src: 'src/types.d.ts', dest: 'dist' },
],
}),
json(),
],
Expand Down

0 comments on commit 8bd63fb

Please sign in to comment.