Coder Social home page Coder Social logo

Comments (3)

adamplouff avatar adamplouff commented on June 3, 2024 1

Confirmed: this works.

I misunderstood how panels load different html and js files –and how segmenting this data is good practice for reducing redundancies with unnecessary duplications.

Steps to fix this error

Create a new folder that matches the second panel mainPath: "./server/index.html",

├── src
│   ├── main
│   │   ├── index.html
│   │   ├── main.svelte
│   │   ├── main.ts
│   ├── server
│   │   ├── index.html
│   │   ├── main.ts

Note

Since the server panel is headless it doesn't need the main.svelte file for UI. Even more savings. Just had to include export {} at the end of the main.ts file to load correctly as a module.

Thanks @justintaylor-dev

from bolt-cep.

justintaylor-dev avatar justintaylor-dev commented on June 3, 2024

If you have 2 panels with varying code bases, then there "should" be 3 JS files generated, one for each panel and one containing all shared assets.

example:

panel-a.js
panel-b.js
shared.js

However I believe the issue you're facing is caused by using the same index.html for both panels. For multi-panel extensions, try separating them into something like:

  • ./main/index.html
  • ./server/index.html

and update your cep.config.ts to:

    {
      mainPath: "./settings/index.html",
      name: "server",
      type: "Custom",
      startOnEvents: ["com.adobe.csxs.events.ApplicationInitialized", "applicationActivate"],
      autoVisible: false,
      width: 600,
      height: 650,
    },

more info here

That should resolve the issue, let me know if that works. Thanks!

from bolt-cep.

justintaylor-dev avatar justintaylor-dev commented on June 3, 2024

That should resolve it, but if the issue pops up again, feel free to re-open this issue.

from bolt-cep.

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.