diff --git a/package-lock.json b/package-lock.json index 570d274..b409f6e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -35,7 +35,7 @@ "rollup": "4.7.0", "rollup-plugin-copy": "3.5.0", "tslib": "2.6.2", - "typescript": "5.3.3" + "typescript": "^5.3.3" } }, "node_modules/@aashutoshrathi/word-wrap": { diff --git a/package.json b/package.json index e861585..6d57d7d 100755 --- a/package.json +++ b/package.json @@ -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": { @@ -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", diff --git a/rollup.config.mjs b/rollup.config.mjs index ee7e460..3f91550 100644 --- a/rollup.config.mjs +++ b/rollup.config.mjs @@ -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: [ { @@ -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(), ],