赞助 webpack,同时从官方商店购买衣服 所有收益将转到我们的 open collective

bundle your
assets scripts

STATIC ASSETS .png .css .jpg .js MODULES WITH DEPENDENCIES .jpg .png .sass .sass .js .sass .cjs .hbs .js

编写代码

src/index.js

import bar from './bar';

bar();

src/bar.js

export default function bar() {
  //
}

使用 webpack 打包

Without config or provide custom webpack.config.js

const path = require('path');

module.exports = {
  entry: './src/index.js',
  output: {
    path: path.resolve(__dirname, 'dist'),
    filename: 'bundle.js'
  }
};

page.html

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

然后在命令行运行 webpack 就会创建 bundle.js

让一切变得简单

立即开始更多关于 webpack 核心概念的高级信息,请通过快速查阅指南部分,或深入概念部分来了解。

支持团队

通过你的贡献、捐款或者赞助,webpack 将获得繁荣发展。你的捐助直接用于支持我们付出工作、持续改进,最加重要的是有助于我们提供优秀的文档和资料!

近期赞助

The following persons/organizations made their first donation in the last 14 days (limited to the top 10).

CarGurus's avatarVincent Masiello's avatarSteve Alfreds's avatarTestsigma Inc's avatarYamagishi Kazutoshi's avatar

白金赞助

platinum sponsorsare those who have pledged $50,000 or more to webpack.

trivago's avatarag-Grid's avatar

金牌赞助

gold sponsorsare those who have pledged $10,000 to $50,000 to webpack.

Segment's avatarAirbnb's avatarFacebook Open Source's avatarFrontend Masters's avatarCapital One's avatarAdobe's avatarCoinbase's avatarWebflow's avatarIndeed's avatar

银牌赞助

silver sponsorsare those who have pledged $2,000 to $10,000 to webpack.

Slack's avatarAMP Project's avataregghead.io's avatarZEIT's avatarTipe's avatarThreadless Shop's avatarPeerigon's avatarN26's avatarTrade Me's avatarRoutee.net's avatarPhotoEditorSDK's avatarRollbar's avatarJared Palmer's avatarAlligator.io's avatar上线了's avatarKeyCDN's avatarSticker Mule's avatarSentry.io's avatarHubSpot's avatarAccelebrate's avatarGoogle Angular's avatarTriplebyte's avatarFree Icons by Icons8's avatarAppfolio's avatarclay's avatarPrincipal Financial Group's avatarWaffle.io's avatarKent C. Dodds's avatarKickstarter's avatar5 minutes of React podcast's avatarTeam Extension's avatar

铜牌赞助

bronze sponsorsare those who have pledged $200 to $2,000 to webpack.

Blockchain Training Alliance 's avatarOmega Media's avatarAddy Osmani's avatarVTEX's avatarCarGurus's avatarSebastian Software GmbH's avatarX-Team's avatarCircleCI's avatarAlgolia's avatarRaygun's avatarProductReview.com.au's avatarBCG Digital Ventures's avatarFire Stick Tricks's avatarEsben Petersen's avatarbinary option Thailand's avatarSarah Drasner's avatarsynedra IT GmbH's avatarYvo Schaap's avatarJoshua Wiens's avatarAndrew Lunny's avatarmantro GmbH's avatarSoftwarePlant's avatarVolare Systems's avatarMarcus Hiles's avataruudetkasinot.com's avatarTuro's avatarClevertech's avatarModus Create's avatarDan Abramov's avatarIrvin Waldman's avatarStatus Hero's avatarBasis Technologies's avatarJetRuby Agency's avatarThe Training Advisors's avatarPeter's avatarWonderProxy's avatarFred Carlsen's avatarCerner Engineering 's avatarAviture Inc.'s avatarreBuy's avatarChristian Alfoni's avatarEven Stensberg's avatarEducative.io's avatarDontPayFull SRL's avatarTrueVendor's avatarRetailMeNot, Inc.'s avatarClaudio Rodriguez's avatarUudet Nettikasinot's avatarNya Casinon's avatarWork & Co's avatarArchitects.io's avatarReact Native Training's avatarCory House's avatarBen Vinegar's avatarDarko Kukovec's avatarAlex Liang's avatarRagunath Ramaswamy's avatarJonathan Soifer's avatarkuma's avatarWonmin's avatarAdam's avatarCodePilot.ai's avatarJonathon Landon's avatarRob Kielty's avatarKarolis Astrauka's avatarEliseu Monar dos Santos's avatarEmilio Martinez-Cordero's avatarShiva Nandan's avatarTaopaiC Tao's avatarDerk-Jan Karrenbeld @SleeplessByte's avatarChris Freeman's avatarSuman Bharadwaj's avatarngAtl Conf's avatarMy True Media's avatarVPS Server's avatarHosted.nl's avatarCodeFirst's avatarAandelen Kopen's avatarBettingFeber.se's avatarMonoVM's avatarTakeShape's avatarMike Murry's avatarI Done This's avatarEvgeny Rodionov's avatarSimon Kjellberg's avatarMixmax's avatarJayshri Sing's avatarByteScout's avatar

赞助者

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. This list shows 100 randomly chosen backers:

Sasha Koss's avatar
Indexed's avatar
Jonas Strømsodd's avatar
dev_to's avatar
Oliver's avatar
MoonMail's avatar
Ross Kaffenberger's avatar
jdinhify's avatar
Michael Van Diest's avatar
what-is-it-so-good-for's avatar
Asgard OU's avatar
PerfPerfPerf's avatar
AB's avatar
MicroPyramid's avatar
Matthew Dierker's avatar
Kyle Warren's avatar
Say Yup's avatar
Ajit Singh's avatar
Eugene Baranov's avatar
Ron McCranie's avatar
bmqb's avatar
Chris Villanueva's avatar
Jeremy Morrell's avatar
José Diaz Seng's avatar
Alexander Wunschik's avatar
Hozefa Jodiawalla's avatar
Dylan Byth's avatar
InstaCasino's avatar
Corjen's avatar
Eric Pan's avatar
Andrew Vieyra's avatar
Bulan's avatar
Steve McPherson's avatar
Robert Požarickij's avatar
Anton Alexandrenok's avatar
meyer's avatar
Valentin Agachi's avatar
Josh Lavely's avatar
Adam Zhu's avatar
Matt Welke's avatar
Marais Rossouw's avatar
Sambla AB's avatar
Constructor Labs's avatar
Theo Salzmann's avatar
Noah Lemen's avatar
Ben Vinegar's avatar
Brainly's avatar
Oliver Bolton's avatar
Colin Wren's avatar
Taylor Edwards's avatar
Kostas Manionis's avatar
Karan Nijhawan's avatar
Cindy Haden's avatar
Ke Wang's avatar
CasinoExpo's avatar
Giorgio Natili's avatar
Eric Henderson's avatar
Chris Nienhuis's avatar
Jaap Lorier's avatar
CouponArea's avatar
Evgeny Timoshenko's avatar
VoucherCopy UK's avatar
Mustafa Rashid's avatar
Craig Kochis's avatar
Intetics Inc's avatar
Matter Mattress's avatar
Jack Moore's avatar
TitanFile's avatar
AlarmDJ's avatar
Freegames66's avatar
Sebastian De Deyne's avatar
Simon Stromberg's avatar
Jonah Hill's avatar
Maarten Tibau's avatar
yoursmarthomeguide's avatar
Jason Kelly's avatar
안희종's avatar
Georgio Wan's avatar
Casino Topp's avatar
Snow Liang's avatar
Jose Quintana's avatar
Mayank Goyal's avatar
Wen Tian Zhang's avatar
henri js framework's avatar
Gagandeep Singh's avatar
Alexander Kaiser's avatar
anonymous's avatar
Xavier Damman's avatar
Peace Ngara's avatar
Aussie Hosting's avatar
Nir Galon's avatar
Michael Lebas's avatar
Amy Pellegrini's avatar
Simon Stromberg's avatar
Simon Stromberg's avatar
Simon Stromberg's avatar
Patric Stromberg's avatar
Kotisivut yritykselle's avatar
Josh Manders's avatar
Elías Rafael  Rodelo Osorio's avatar