Giter VIP home page Giter VIP logo

Comments (2)

hschletz avatar hschletz commented on July 20, 2024

I sort of found the problem, which is apparently not caused by @nextcloud/vue directly. The observed behavior is just a symptom.

My application has multiple entry points. One of them is the main application from which the screenshots were taken. Another one is a plugin for the files application which shares some dependencies with the main application. Vite splits common code into separate files which will be loaded automatically. This usually works fine.

One of those shared dependencies is @nextcloud/dialogs which both entry points use for toasts. After removing all references to this package from the files plugin, the main application displays correctly. In fact, the problem can be reproduced by any additional entry point as simple as

import { showError } from "@nextcloud/dialogs"
showError('boo')

Using both packages in a single entry point does not cause problems.

I suspect the root cause is with @nextcloud/dialogs, which acts weirdly regarding bundling, tree shaking and code splitting.

I'm leaving this issue open in case you plan to make the package immune to interference (up to 8.11.3, this was not a problem).

from nextcloud-vue.

ShGKme avatar ShGKme commented on July 20, 2024

Hi @hschletz

This is probably a Vite's bug. We have just created a Vite plugin in our @nextcloud/vite-config to fix this behavior.

nextcloud-libraries/nextcloud-vite-config#204

It is to be released very soon.

from nextcloud-vue.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.