Code Monkey home page Code Monkey logo

Comments (8)

stephencookdev avatar stephencookdev commented on August 27, 2024 1

I imagine this one would require a bit of discussion before implementing. Namely, what would the expected behaviour be when running in multicompiler mode?

Should Jarvis show multiple tabs in its display, each tab showing the output from each compiler?

Or should Jarvis try and average out all of the data for each compiler, as if it's just running through 1 compiler?

For now, as a workaround, if you wanted something closer to the separate tabs route, you could just make multiple Jarvis servers running on different ports, e.g.:

const compiler1Config = {
  plugins: [new Jarvis({ port: 1337 })]
};
const compiler2Config = {
  plugins: [new Jarvis({ port: 1338 })]
};

module.exports = [compiler1Config, compiler2Config]

And then you should a Jarvis server for each compiler, running on http://localhost:1337 and http://localhost:1338

from jarvis.

Jack89ita avatar Jack89ita commented on August 27, 2024

For my personal use it should be good to open 2 instances on different ports, but when i try to do it as you suggest the second one ovveride the first one.
This is what i'm trying to do:

plugins.push(
  new Jarvis({
    port: 1337
  })
);

pluginsCSS.push(
  new Jarvis({
    port: 1338
  })
);

But only port 1338 works.
Any suggest?

from jarvis.

stephencookdev avatar stephencookdev commented on August 27, 2024

Just double checked, doing 2 server works for me.

Are you sure you're not just having issues with the plugins config in general (e.g. if you keep everything as it is now, but remove the pluginsCSS.push(new Jarvis({ port: 1338 })), does the 1337 server still work?

And when you say 1337 isn't working... what are you seeing exactly? Console errors in the terminal? Console errors in the dashboard? The server crashing?

from jarvis.

Jack89ita avatar Jack89ita commented on August 27, 2024

Yes, with only one instance of the plugin everything is working fine.
When i use both ports, in port 1338 all is working, but in port 1337 it seems to not even open the connection, in fact the browser can't reach that port.

from jarvis.

stephencookdev avatar stephencookdev commented on August 27, 2024

Is it possible for you to share your whole webpack config? (or a subset of it which still exhibits the same issue)

from jarvis.

Jack89ita avatar Jack89ita commented on August 27, 2024

Sure, i can share a small subset, hope it will be useful:

let   plugins = [];
let   pluginsCSS = [];

plugins.push(
  new Jarvis({
    port: 1337
  })
);

pluginsCSS.push(
  new Jarvis({
    port: 1338
  })
);

module.exports = [{
  //JS Stuff
  entry: {
    ...
  },
  output: {
    ...
  },
  module: {
    ...
  },
  plugins: plugins
},{
  //CSS Stuff
  entry: {
    ...
  },
  output: {
    ...
  },
  module: {
    ...
  },
  plugins: pluginsCSS
}]

plugins and pluginsCSS are arrays where i store various plugins as Jarvis.

from jarvis.

stephencookdev avatar stephencookdev commented on August 27, 2024

But how are the plugins and pluginsCSS variables instantiated and populated?
It'd be great if you could include a webpack config that we can drag&drop into our workspace, so we can run it locally and reproduce the issue

from jarvis.

Jack89ita avatar Jack89ita commented on August 27, 2024

I edited the aswer to show you the declarations on the variables e how are populated.
If you still need the webpack config i can send it to you if you explain me how.
Thanks

from jarvis.

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.