Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hashes are not imported #2

Closed
mo3g666 opened this issue Dec 30, 2021 · 2 comments
Closed

Hashes are not imported #2

mo3g666 opened this issue Dec 30, 2021 · 2 comments

Comments

@mo3g666
Copy link

mo3g666 commented Dec 30, 2021

Hello, when packing the project, there is no transfer of hashes from the npm package

index.ts

import './setup';

mp.events.add('playerReady', (player) => {
	player.model = RageEnums.Hashes.Ped.U_F_M_CORPSE_01;
});

index.js

'use strict';

var path = require('path');
var dotenv = require('dotenv');

function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }

var path__default = /*#__PURE__*/_interopDefaultLegacy(path);

dotenv.config({
    path: path__default["default"].resolve('.env')
});

mp.events.add('playerReady', function(player) {
    player.model = RageEnums.Hashes.Ped.U_F_M_CORPSE_01;
});
@leonardssh
Copy link
Owner

In order to benefit from const enums, you must replace the SWC compiler with rollup-plugin-typescript2 or @rollup/plugin-typescript

Because SWC does not yet have support for const enums.

@leonardssh
Copy link
Owner

You can revert 7a53b74 and the compiler is already set up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants