Answer the question
In order to leave comments, you need to log in
Connecting js/css, how to do it with or without webpack?
A simple question to which I could not find a sane answer. How to correctly include js/css in the sequence I need (with dependencies). Everything I read about webpack is reminiscent of shooting sparrows from a cannon. If I need to combine dozens of js/css files and connect them to an html page, do I really need to do it manually? I guess there are a lot of "lazy" developers who have prepared a bunch of tools for this. So far, the method seems to be the most accessible https://habrahabr.ru/post/278033/
But even this is redundant, I just need to include libraries and css...
Answer the question
In order to leave comments, you need to log in
Webpack has a glob equivalent called require context :
require.context('./src', false, /\.(js|css)$/);
// соберёт все js и css файлы из директории src
TOM.boot.load( 'libraries/*', [ 'jquery', 'scroll' ], function( ){ } );
- how should modules be sorted when connected if they depend on each other? By alphabet? By file size? By creation date?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question