logo
指南
配置
插件
API
English
简体中文
GitHub
Twitter
Discord
指南
配置
插件
API
English
简体中文
GitHub
Twitter
Discord
logo
Overview
plugins

dev

assetPrefix
beforeStartUrl
client
hmr
progressBar
setupMiddlewares
startUrl
writeToDisk

source

aliasStrategy
alias
define
entry
exclude
include
preEntry
transformImport

output

assetPrefix
charset
cleanDistPath
copy
cssModules
dataUriLimit
disableFilenameHash
disableMinimize
distPath
externals
filename
injectStyles
inlineScripts
inlineStyles
legalComments
overrideBrowserslist
polyfill
sourceMap
targets

html

appIcon
crossorigin
favicon
inject
meta
mountId
outputStructure
scriptLoading
tags
templateParameters
template
title

server

compress
headers
historyApiFallback
host
htmlFallback
https
port
proxy
publicDir
strictPort

tools

autoprefixer
bundlerChain
cssLoader
htmlPlugin
less
postcss
rspack
sass
styleLoader

performance

bundleAnalyze
chunkSplit
dnsPrefetch
preconnect
prefetch
preload
printFileSize
profile
removeConsole
removeMomentLocale

copy#

  • 类型: CopyPluginOptions | CopyPluginOptions['patterns']
  • 默认值: undefined

将指定的文件或目录拷贝到构建输出目录中。

例如,将 src/assets 下的文件直接拷贝到 dist 目录:

export default {
  output: {
    copy: [{ from: './src/assets', to: '' }],
  },
};

更详细的配置项请参考:copy-webpack-plugin 文档。

Edit this page on GitHub
上一页cleanDistPath
下一页cssModules
目录