Giter Site home page Giter Site logo

Comments (6)

bent0b0x avatar bent0b0x commented on June 11, 2024

@eliawk can you detail what the ultimate need is for this change?

from paratii-portal.

jellegerbrandy avatar jellegerbrandy commented on June 11, 2024

@bent0b0x , the use case is as follows. to functino, the portal needs to know the addresses of the contracts on the blockchain. This all passes thorugh a registry contract that contains the address of the other deployed contracts. This registry address is more or less stable in production (currently it is 0x0B101ff870F8BAd6c437C45eCb2964D7e8034593), but will be different for the staging server (not there yet) and will be a new fresh address when testing.

So, thinking about it, we perhaps do not need the webpack.dev.js variant (since the tests are not running against the webpack'ed code, but against the es8 code directly), but we will need a webpack.prod.js and (in the near future) a webpack.staging.js

from paratii-portal.

bent0b0x avatar bent0b0x commented on June 11, 2024

I'm not sure we will need separate webpack configs for this, but rather just regular json config files w/ these kinds of settings. And we could import those config files conditionally based on the NODE_ENV, into our webpack.config.js and use the WebpackDefinePlugin to set them in our code

from paratii-portal.

jellegerbrandy avatar jellegerbrandy commented on June 11, 2024

I'm not sure why that would be better/simpler though than having 2 different files

from paratii-portal.

bent0b0x avatar bent0b0x commented on June 11, 2024

My reasoning is this: the webpack configs are primarily for defining our build process, and possibly secondarily for injecting variables into our code (at least that is how I view it). To avoid confusion on the build process and to ensure the build processes in different environments does not diverge too much, I would like to keep that all in one file. For things that need to diverge based on env, like what we are talking about here, then separate config files makes sense, but our webpack config can just require those conditionally.

I’m speaking from some experience here where I worked on a project with a prod webpack config and one for dev, and it made it very easy to add something for dev and forget to do it for prod.

All of that said, willing to look at a PR with this implemented and eat my words later on!

from paratii-portal.

jellegerbrandy avatar jellegerbrandy commented on June 11, 2024

from paratii-portal.

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.