Write your code

app.js

import bar from './bar';

bar();

bar.js

export default function bar() {
  //
}

Bundle with webpack

webpack.config.js

module.exports = {
  entry: './app.js',
  output: {
    filename: 'bundle.js'
  }
}

page.html

<html>
  <head>
    ...
  </head>
  <body>
    ...
    <script src="bundle.js"></script>
  </body>
</html>

Then run webpack on the command-line to create bundle.js.

It's that simple

Get Started quickly in our Guides section, or dig into the Concepts section for more high-level information on the core notions behind behind webpack.

Support the Team

Through contributions, donations, and sponsorship, you allow webpack to thrive. Your donations directly support office hours, continued enhancements, and most importantly, great documentation and learning material!

Platinum Sponsors

platinum sponsorsare those who have pledged $50000 or more to webpack.

Gold Sponsors

gold sponsorsare those who have pledged $10000 to $50000 to webpack.

ag-grid's avatarcapitalone's avatartrivago's avatar

Silver Sponsors

silver sponsorsare those who have pledged $2000 to $10000 to webpack.

angularclass's avataravatarhost-org's avatar5minreact_audio's avatarjoelhooks's avatar

Bronze Sponsors

bronze sponsorsare those who have pledged up to $2000 to webpack.

peerigon's avatarphotoeditorsdk's avatarfrontendmasters's avatarsentry's avatarvtex's avatarxteam's avatarjfellner's avatarzeit's avatarsebastiansoft's avatarjaredpalmer's avatarkentcdodds's avatarrollbar's avatarwaffleio's avatarsarah_edo's avatarsoftwareplant's avataryvoschaap's avataralligatorio's avatarmoduscreate's avatarmichellemcfarland's avatarstickermule's avataraddyosmani's avatarhubspot's avataraccelebrate's avataricons8's avataralgolia's avatarjoshuawiens's avatarrebuy's avatarcontact4's avataralunny's avatardafeng's avatarreactnativetraining's avatarthetrainingadvisors's avatarproductreview's avatarArchitects.ioappfolio's avatarworkco's avatarep's avatarirvinwaldman's avatarben2's avatardanabramov's avatarchristianalfoni's avataridonethis's avatarevgenyrodionov's avatarclayglobal's avatarn26's avataravatar

Backers

The following Backers are individuals who have contributed various amounts of money in order to help support webpack. Every little bit helps, and we appreciate even the smallest contributions.

angular's avatar
kossnocorp's avatar
matteocng's avatar
ericclemmons's avatar
jjwonmin's avatar
mhpoin's avatar
sjricc's avatar
esjacobs's avatar
kevinjames's avatar
darkokukovec's avatar
housecor's avatar
openlistings's avatar
_seanclayton's avatar
albertwchang's avatar
micropyramid's avatar
jseidel's avatar
gs's avatar
nicolaskroos's avatar
vlad's avatar
oliverzeigermann's avatar
jeantimex's avatar
email's avatar
seanlarkin's avatar
alexliang's avatar
alexleung's avatar
adamrecvlohe's avatar
reybango's avatar
sprjr's avatar
jorgeantunes's avatar
shaneckel's avatar
ragunathramaswamy's avatar
omt-tech's avatar
evgenijsafronov's avatar
alex11's avatar
rjun07a's avatar
derk-jan's avatar
hello2's avatar
usirin's avatar
rafalfilipek's avatar
joelchen's avatar
gilbarbara's avatar
wellcco's avatar
damlemail's avatar
felipedeamorim's avatar
simenbrekken's avatar
jeremyschlatter's avatar
stillconor's avatar
ggrgur's avatar
dzello's avatar
mark4's avatar
tylermcginnis's avatar
michaelvandiest's avatar
ching-tingwu's avatar
iamstarkov's avatar
alejandrob's avatar
jkimbo's avatar
adamrackis's avatar
sayyupnl's avatar
memosanchez's avatar
dshills's avatar
threepointone's avatar
james3's avatar
simonkjellberg's avatar
bruno12mota's avatar
travisarnold's avatar
suhasdeshpande's avatar
danieltian's avatar
loklaan's avatar
arthurstolyar's avatar
jasonlaster11's avatar
karolisastrauka's avatar
deanpogni's avatar
marcusnielsen's avatar
ajitsonlion's avatar
webpack1's avatar
jacobpeddicord's avatar
snolflake's avatar
aarontrostle's avatar
nevenrodic's avatar
eddyhernandez's avatar
adamegesa's avatar
_sashashakun's avatar
franciscobueno's avatar
jacobmischka's avatar
me1's avatar
_azayzel's avatar
eliseumds1's avatar
eduardkyvenko's avatar
me17's avatar
silvenon's avatar
jzelez's avatar
gaelmarziou's avatar
shekadzianis's avatar
jslauthor's avatar
marknv1991's avatar
nicolaigrosser's avatar
tdmckinn's avatar
hellbeast92's avatar
tluenborg's avatar
pushred's avatar
jonasstromsodd's avatar
andreypopp's avatar
webdesserts's avatar
pavelkornev's avatar
aerohitk's avatar
kurtiskemple's avatar
frenchtoastrllc's avatar
ebaranovdev's avatar
zemgalis's avatar
twobucks's avatar
taopaic's avatar
nickadeemus2002's avatar
ayastreb's avatar
claudiordgz's avatar
iam's avatar
emarticor's avatar
jwebe0pe's avatar
cfreemancode's avatar
aripalo's avatar
keithito's avatar
mrjoelkemp's avatar
andreicek's avatar
kevinmaes's avatar
jan-kantypawelski's avatar
martinkammersberger's avatar
bentlegen's avatar
richardworsfold's avatar
philippeleger's avatar
nathanhunzaker's avatar
ameyakoshti's avatar
colinwrenca's avatar
blade0r's avatar
kevin's avatar
danjasnowski's avatar
manuelbieh's avatar
oieduardorabelo's avatar
jakewilliams's avatar
davidjungst's avatar
parkerbond's avatar
danieltreasure's avatar
kennethbrubaker's avatar
mukeshsoni's avatar
kostasmanionis's avatar
guilhermerodrigues's avatar
Rafachon's avatar
tranvu's avatar
gregvenech's avatar
kuma's avatar
pheuter's avatar
rexxars's avatar
mpalmer_'s avatar
viestursteivans's avatar
selcukkiraz's avatar
rude's avatar
santerihiltunen's avatar
ridermansb's avatar
hello6's avatar
bhargavponnapalli's avatar
jlgeering16's avatar
aarongodin's avatar
jreem's avatar
giovanni0918's avatar
kanitkornk's avatar
pruett's avatar
sboulade's avatar
arturkulig's avatar
benmccormick's avatar
dmh's avatar
sumandna's avatar
reznord's avatar
dominikrodler's avatar
wrumyl's avatar
markusdrake's avatar
v7rulnik's avatar
craigdoremus's avatar
timberio's avatar
sergeysharov's avatar
endel's avatar
harunhasdal's avatar
darrenscerri's avatar
karannijhawan's avatar
hozefaj's avatar
leonidasesteban's avatar
joewoojin's avatar
fravic's avatar
arturptaszek's avatar
andrewbrown's avatar
marklozano's avatar
timgriesser's avatar
calesce's avatar
mikeauclair's avatar
psulek's avatar
jeevanpalakurty's avatar
ngt_consulting's avatar
kaven276's avatar
josemaenzo's avatar
mikejoyce's avatar
krofdrakula's avatar
altruity's avatar
zjammal's avatar
radojesrb's avatar
spentacular's avatar
corjen's avatar
miclo's avatar
rauban's avatar
xiplias's avatar
jsdotcr's avatar
carlosepp's avatar
lukeeeebennettplus's avatar
markthethomas's avatar
genechulkov's avatar
kevinortman's avatar
morrelljeremy's avatar
molokovev's avatar
getbyteswag's avatar
alexmost1989's avatar
erichfeng's avatar
relekang's avatar
gabeldeluxe's avatar
aseem's avatar
mpjme's avatar
ojkelly's avatar
13web-avenue's avatar
mail6's avatar
zward84's avatar
timoshenkoevgeny's avatar
ryandrewjohnson's avatar
a's avatar
chris's avatar
geoyws's avatar
code's avatar
andreaskeller's avatar
ddwag1's avatar
johan's avatar
musito's avatar
manatsawin's avatar
kbrabrand's avatar
mail's avatar
patrickarminio's avatar
vladkosinov's avatar
sean1's avatar
alejandroortiz's avatar
danillops's avatar
jorgecuadrafueyo's avatar
scisdahl's avatar
yinanfang's avatar
zhaojunbest's avatar
left_pad's avatar
maarten's avatar
marioestrada's avatar
perrypoon's avatar
ganjianwei's avatar
joseluis_q's avatar
sebastiandedeyne's avatar
mattclarke's avatar
julianvmodesto's avatar
joanllenasmaso's avatar
jasonkelly6's avatar
ericstumper's avatar
coderliang's avatar
michalhantl's avatar
panutat's avatar
georgiowan's avatar
gavinmogan's avatar
mattwelke's avatar
webpack2's avatar
danez's avatar
renatodex's avatar
zangrafx's avatar
matiasfh's avatar
rene's avatar
heejongahn's avatar
spjulien's avatar
happylinks's avatar
rosskaff's avatar
pepibumur's avatar
knovour's avatar
me7's avatar
hugufc's avatar
lukepage's avatar
mirceadinoiu's avatar
maiis's avatar
vvoyer's avatar
sergiodxa's avatar
tamouse1's avatar
matthewerker's avatar
elexd3v's avatar
patrick's avatar
saravieira's avatar
ivanzusko's avatar
lukamaljic's avatar
andreykvital's avatar
me6's avatar
restuta's avatar
vsevolodokhrin's avatar
xdamman's avatar
tadejafirman's avatar
peacengara's avatar
jiyinyiyong's avatar
kkencom's avatar
mashaal's avatar
userdima's avatar
chkal's avatar
rchanou's avatar
mindfulgeek's avatar
rpgmorpheus's avatar
alexeyraspopov's avatar
stgeass's avatar
ivan1's avatar
andrewrota's avatar
restrry's avatar
andreychev's avatar
hey1's avatar
benimnetz's avatar
pedromsluz's avatar
avaly's avatar
anriasaturov's avatar
dinakartumu's avatar
andreykravtsov's avatar
michaellebas's avatar
patrickneschkudla's avatar
nirgalon's avatar
proza's avatar
tatsuyanakano's avatar
christianmatsoukis's avatar
oliviercombe's avatar
mohammadumairk's avatar
maximprocopenco's avatar
thomasrandolph's avatar
dmitrymatveevnz's avatar
lorenzosicilia's avatar
rpkaper's avatar
hakimelek's avatar
dgrebb's avatar
osiegemund's avatar
nalekberov's avatar
abarghoud's avatar
ufoqhmdt's avatar
zhulongzheng's avatar
timrbula's avatar
poke5464's avatar
jbkimelman's avatar
eriktfox's avatar
antonalexandrenok's avatar
15jzhang's avatar
mattdionis's avatar
smiki-tky's avatar
kushalpandya's avatar
nathanwalker's avatar
niran's avatar
moritzsattler's avatar
danawoodman's avatar
tublitzed's avatar
josh's avatar
viliamelischer's avatar
bnayazil's avatar
sarah's avatar
kazupooot's avatar
lehoanganh25991's avatar
surajpoddar16's avatar
wangwusan's avatar
eliotik's avatar
frooeyzanny's avatar
gevmarlen's avatar
me21's avatar
riyadhalnur's avatar
jm3's avatar
kiemhd's avatar
junjiehuang's avatar
skillflow's avatar