Answer the question
In order to leave comments, you need to log in
How to organize front-end on ES6 in 1C-Bitrix?
Hello.
I will try to briefly describe the essence of the issue:
there is a project on Bitrix, let's call it site.ru. There is its dev version dev.site.ru, under the git, everything works fine.
But then the idea comes to me to implement new functionality in React using ES6 and JSX. I cannot say that I am familiar with the entire stack of modern technologies, and therefore I need support. I thought a little about the scheme of actions, but I'm not sure if it's correct:
you need to install npm, webpack, babel on the dev copies.
accordingly, during development, all work will go to dev.site.ru:3000
and if the result is successful, you need to take the resulting bundle.js and transfer it to prod using git.
Does this scheme have the right to life?
What problems might arise?
Answer the question
In order to leave comments, you need to log in
The question is quite tricky actually. The answer largely depends on how you deliver the code to production, whether there is some kind of system like Gitlab CI, or do everything manually via git push/git pull.
I think it's quite normal to keep both the js sources and the built / minified bundle.js in git.
So you simplify your life - it will be enough just to transfer the files to prod, it's better than running the build on the production server.
Usually bundle is not stored in git.
You can either manually or automatically run tests and assembly somewhere when updating, and then roll out the update to the prod.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question