When editing a component
% cd frontend #webpack.config.Directory where js is located
% webpack #webpack.config.Build js to load in app using js
The change of component is reflected by inputting the command. At this time, there is no problem even if you keep the rails server running in another tab. Therefore, when developing
Tab 1 | Tab 2 |
---|---|
The tab where the rails server is running | webpack.config.Directory containing js Edit component → build with webpack command |
If you divide the tabs in the form of, development will be smooth.
Since the component is also compiled with webpack in advance, the rails application only needs to read one output js. Impression that the processing speed is quite different from reading the view with the view file under views of rails.