Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

webpack 起步 #6

Open
zerofront opened this issue Apr 13, 2019 · 0 comments
Open

webpack 起步 #6

zerofront opened this issue Apr 13, 2019 · 0 comments

Comments

@zerofront
Copy link
Owner

webpack 的基本概念

webpack

基本上弄清楚以上的概念,对于 webpack 就会有个基本了解
详细的官方文档

webpack 项目初始化

mkdir my-ilb && cd mpm inity-ilb
npm install webpack webpack-cli --save-dev

在 webpack v4 中,可以无须任何配置,然而大多数项目会需要很复杂的设置,这就是为什么 webpack 仍然要支持 配置文件。我们一般在根目录创建一个build目录,里面放置一些webpack配置文件 webpack.config.js 等。

配置具体可以参考官方文档

webpack --config build\webpack.config.js

webpack 优化

关于 webpack 优化 目前来说我认为的优化大概有
按需加载
代码分离
动态导入
提升构建性能

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant