ton-core / ton

Most popular TON Typescript Library
MIT License
69 stars 56 forks source link

Build Optimization Error with ton Package in Angular Dapp #33

Open DanialV opened 5 months ago

DanialV commented 5 months ago

Description: I am encountering an issue with the ton package when building my Angular Dapp for production with build optimization enabled. The package works perfectly in the development environment, but the following error occurs during the production build:

Cell.js:107 Uncaught TypeError: Cannot read properties of undefined (reading 'Ordinary')
    at new ie (Cell.js:107:40)
    at 9786 (Cell.js:207:14)
    at r (bootstrap:19:1)
    at 121 (Builder.js:12:16)
    at r (bootstrap:19:1)
    at 1665 (contractAddress.js:11:19)
    at r (bootstrap:19:1)
    at 5230 (index.js:33:25)
    at r (bootstrap:19:1)
    at 2971 (index.js:25:14)

Steps to Reproduce:

Integrate the ton package into an Angular project. Ensure everything works correctly in the development environment. Build the project for production with build optimization enabled using the Angular CLI command: ng build --prod --optimization. Expected Behavior: The project should build successfully without any errors and work as expected in the production environment.

Actual Behavior:

The build process fails with the above-mentioned error, indicating an issue related to undefined properties in Cell.js.

Environment:

Angular version: 14.2.12 ton package version: 13.11.1 Node.js version: 18 OS: MacOs Additional Information: Any other relevant information or configurations that might help in diagnosing the issue.

Request:

I would appreciate any guidance or fixes to resolve this issue so that the ton package works seamlessly with Angular's production build optimizations.

Thank you!

shariquex commented 2 months ago

Hi team any update on solution.