Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
W
webpack-training
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
shangbj
webpack-training
Commits
babffc01
Commit
babffc01
authored
Jun 09, 2018
by
shangbj
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
3714dd40
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
1 deletion
+20
-1
readme.md
readme.md
+20
-1
No files found.
readme.md
View file @
babffc01
...
...
@@ -33,4 +33,23 @@ hash和chunkhash的长度是可以制定的,[hash:8]代表取8位值,默认
*
若想自定义输出文件的位置和名称,则配置output
*
若想自定义寻找依赖模块时的策略,则配置resolve
*
若想自定义解析和转换文件的策略,则配置module,通常是配置module.rules里的Loader
*
若其他大部分需求可能通过Plugin去实现,则配置plugin
\ No newline at end of file
*
若其他大部分需求可能通过Plugin去实现,则配置plugin
---------------------------
### webpack4提供了mode
配置中设置
```
javascript
module
.
exports
=
{
mode
:
'production'
};
```
cli参数中传递
```
javascript
webpack
--
mode
=
production
```
选项|描述
development|会将 process.env.NODE_ENV 的值设为 development。启用 NamedChunksPlugin 和 NamedModulesPlugin。
production|会将 process.env.NODE_ENV 的值设为 production。启用 FlagDependencyUsagePlugin, FlagIncludedChunksPlugin, ModuleConcatenationPlugin, NoEmitOnErrorsPlugin, OccurrenceOrderPlugin, SideEffectsFlagPlugin 和 UglifyJsPlugin.
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment