webpack.docschina.org - webpack

home - domains - webpack.docschina.org

webpack5 webpack webpack 中文文档 webpack 官方中文 webpack 5 官方中文 印记中文 docschina docschina.org webpack.docschina.org doc.react-china.org nodejs.cn vue.docschina.org babel.docschina.org parceljs.docschina.org rollup.docschina.org koajs.docschina.org

Goto Site

https://webpack.docschina.org/

Site Description

webpack 是一个模块打包器。它的主要目标是将 JavaScript 文件打包在一起,打包后的文件用于在浏览器中使用,但它也能够胜任转换、打包或包裹任何资源。

Example Site Content

webpack中文文档参与贡献博客印记中文English中文한국어 构建你的 assets scripts 静态资源 .png .css .jpg .js 模块依赖 .jpg .png .sass .sass .js .sass .cjs .hbs .js 编写代码src/index.jsimport bar from './bar.js'; bar();src/bar.jsexport default function bar() { // }构建不使用配置 或提供自定义的 webpack.config.jsconst path = require('path'); module.exports = { entry: './src/index.js', output: { path: path.resolve(__dirname, 'dist'), filename: 'bundle.js', }, };page.html<!DOCTYPE html> <html> <head> <meta charset="utf-8" /> ... </head> <body> ... <script src="dist/bundle.js"></script> </body> </html>在控制台运行 webpack 命令,生成 bundle.js。深入学习快速开始部分在指南章节,如果有兴趣深入学习,可以查阅 概念 章节,以了解 webpack 的核心概念以及底层实现。快速开始对比Privacy Policy周边Awesome webpack术语品牌Gitter更新日志

Websites with similar content