Movatterモバイル変換


[0]ホーム

URL:


webpack logo

bundle your
assets scripts

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

Write Your Code

src/index.js

import barfrom'./bar.js';bar();

src/bar.js

exportdefaultfunctionbar(){//}

Bundle It

Without config or provide customwebpack.config.js

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

page.html

<!DOCTYPEhtml><html><head><metacharset="utf-8"/>    ...</head><body>    ...<scriptsrc="dist/bundle.js"></script></body></html>

Then runwebpack on the command-line to createbundle.js.

Awesome, isn't it? Let's dive in!

Get Started quickly in ourGuides section, or dig into theConcepts section for more high-level information on the core notions 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!

Latest Sponsors

 

 

 

Platinum Sponsors

 

 

 

Gold Sponsors

 

 

 

Silver Sponsors

 

 

 

Bronze Sponsors

 

 

 

Backers

 

 

 


[8]ページ先頭

©2009-2025 Movatter.jp