-
Notifications
You must be signed in to change notification settings - Fork 208
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
core-web package fails during runtime after building within vue app #482
Comments
I found this example of JavaScript that becomes broken when compiled through webpack/vue-cli in production mode: class TestClass {}
const TestNamespace = {}
TestNamespace[TestClass.name] = TestClass
class TestSubClass extends TestNamespace.TestClass {}
console.log(TestSubClass) This looks like an issue with the minimizer used by webpack/vue-cli. Building in development mode ( |
hi @mar-v-in thank you for your reply. @takahser also added an issue on the vue-cli repo and here is their reply: vuejs/vue-cli#3590 (comment) what's your thought on it? |
@sisou any news on this? i hit the same problem on webpack production build the only solution is disable minimize in production :/
|
ok worked with this too
as shown in the comment #482 (comment) the importend part is mangle: {keep_classnames: true}, //#482 |
Thank you for your research and solution. The core-js library currently relies on global class names, which are indeed mangled by the production bundler. For the browser package of Nimiq 2.0 Albatross, we hope to not rely on globals anymore and have a self-contained build. |
hey @sisou, what i read there is now way right now for a rust wasm Albatross build, would it make still sense to implement nimiq with the core-js for a webapp? |
The Core Client API will (hopefully) not change significantly for Albatross. So yes, building a Nimiq webapp is still a good idea with core-js now. Experiments with compiling to WASM in core-rs-albatross are currently going on, but since the light consensus is also not 100% ready yet, a browser node from the rust code is not yet possible. |
ok good to know! |
@sisou no idea if this is relevant but on debug builds i still get
difficult to debug to find web.esm.js 1:95102-95112 |
New issue checklist
README
General information
Bug report
Expected behavior
@nimiq/core-web
should work in a VueJs app either of the following both scenarios:vue-cli-service serve
vue-cli-service build
and running from a webserver should also work.Actual behavior
vue-cli-service serve
works.vue-cli-service build
and running from a webserver doesn't work. Instead, it fails with a console error, which is varies in different browsers (for details, see 'Crash log' section)Steps to reproduce
git clone
the reproduction repo and run:Crash log
The text was updated successfully, but these errors were encountered: