0 Star 2 Fork 0

嗷大张 / learn-rxjs6

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
webpack.common.js 1.84 KB
一键复制 编辑 原始数据 按行查看 历史
AodaZhang 提交于 2020-12-31 16:53 . 代码更新
/**
* @description 小游戏类webpack单页定义文件
* @author aodazhang 2020.12.06
*/
const path = require('path')
// 一.路径
const entryFilePath = path.resolve(__dirname, './src') // webpack打包入口路径
const distFilePath = path.resolve(__dirname, './dist') // webpack打包输出路径
const publicFilePath = path.resolve(__dirname, './public') // 公共模板文件路径
// 二.文件名
const entryName = 'index' // webpack入口js文件名
const templateName = `${entryName}.html` // webpack模板html文件名
const templateTitle = 'learn-rxjs6' // webpack模板html标题
const templateDescription = '学习rxjs6' // webpack模板html meta描述
const jsFolderName = 'js' // js文件打包输出目录名
const cssFolderName = 'css' // css文件打包输出目录名
const imageFolderName = 'image' // 图片文件打包输出目录名
const fontFolderName = 'font' // font文件打包输出目录名
const mediaFolderName = 'media' // 媒体文件打包输出目录名
const hashRuleName = '[name]_[contenthash:8]' // 文件名hash规则
const aliasName = {
'@': path.resolve(__dirname, './src'),
} // 文件引用路径别名:js -> '@/'、css -> '~@/'
// 三.配置控制
const isTypeScript = true // 是否typescript项目
const isCssModules = false // 是否开启css模块化
const isProductionSourceMap = false // 是否生产环境开启source map
const isProductionGzip = true // 是否生产环境开启gzip
const isProductionAnalyzer = true // 是否生产环境开启analyzer包分析
module.exports = {
entryFilePath,
distFilePath,
publicFilePath,
entryName,
templateName,
templateTitle,
templateDescription,
jsFolderName,
cssFolderName,
imageFolderName,
fontFolderName,
mediaFolderName,
hashRuleName,
aliasName,
isTypeScript,
isCssModules,
isProductionSourceMap,
isProductionGzip,
isProductionAnalyzer,
}
1
https://gitee.com/aodazhang/learn-rxjs6.git
git@gitee.com:aodazhang/learn-rxjs6.git
aodazhang
learn-rxjs6
learn-rxjs6
master

搜索帮助