Search code examples
javascriptvisual-studiowebpackwebpack-2

having trouble using bundles


i have a web app on my local computer, for now all the code is on the same index.js file.

i want to split the code to a several files, i understand the best way is to use libraries like require.js or webpack etc..

and use import to import the splitted js files

the thing is that after two days of intense reading the documentation i just cant figure how to make the bundles work

information: editor: vs code , syntax es=6 babel , webpack:v2.0.0

would someone be nice and explaine me how to configure webpack localy so i can use import?


Solution

  • i have found great explanation guides in youtube highly recommend anyone who have trouble with understanding webpack to try and lern from here webpack introduction