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

Unnessasarry comment inside of dist/ARnft.js #283

Open
tkapu opened this issue Jul 22, 2022 · 4 comments
Open

Unnessasarry comment inside of dist/ARnft.js #283

tkapu opened this issue Jul 22, 2022 · 4 comments
Assignees
Labels
good first issue Good for newcomers

Comments

@tkapu
Copy link

tkapu commented Jul 22, 2022

If you look into the ARnft.js file, then you will notice that about half the file is just commented out Base64 code. I think, that should be removed to reduce the file size.
~1800kb to about ~750kb

@kalwalt kalwalt added the good first issue Good for newcomers label Oct 8, 2022
@kalwalt kalwalt self-assigned this Oct 8, 2022
@kalwalt
Copy link
Member

kalwalt commented Oct 8, 2022

Hi @tkapu ARnft is based on webarkit/jsartoolkitNFT the base64 code that you were reading is the WASM bitecode bundled with webpack, if you remove that code you will remove the core of it. Probably it is possible to reduce jsartoolkitNFT WASM code reducing emscripten code, but this is not a prority for me.

@kalwalt kalwalt closed this as completed Oct 8, 2022
@tkapu
Copy link
Author

tkapu commented Oct 18, 2022

Hi @kalwalt,
i checked the files in the dist folder of webarkit/jsartoolkitNFT and they look fine.
Are you sure, that the ARnft.js file is clean? When i open it with a file editor, the second line starts with //# and when i remove that line completely everything works fine, as before. When i use a minifier tool on the code, then it remove that comment/code as well.

@kalwalt kalwalt reopened this Oct 22, 2022
@kalwalt
Copy link
Member

kalwalt commented Oct 22, 2022

I used the TerserPlugin as you can see

ARnft/webpack.config.js

Lines 48 to 56 in 5a66982

optimization: {
minimize: true,
minimizer: [
new TerserPlugin({
parallel: true,
extractComments: false
}),
],
},

I don't see this second line. Maybe have you build the distribution library with the dev option?

@tkapu
Copy link
Author

tkapu commented Oct 25, 2022

I'm using "yarn build-ts" from the readme file. I was missing the optimization part, but it didn't change my result.

You can see the second line in the file hear on github

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

No branches or pull requests

2 participants