yyl-base-webpack-config
v0.3.6
Published
## 安装
Downloads
58
Readme
yyl-base-webpack-config
安装
yarn add yyl-base-webpack-config
使用
// webpack.config.js
import yylBaseWebpackConfig from 'yyl-base-webpack-config'
import { merge } from 'webpack-mergej'
module.exports = (env) => {
...merge({
context: __dirname,
env,
alias: {
'~': path.join(__dirname, './src'),
'~@': path.join(__dirname, './src/components/')
},
yylConfig: {
concat: {
'dist/js/shim.js': [
'src/js/lib/shim/es5-sham.min.js',
'src/js/lib/shim/es5-shim.min.js',
'src/js/lib/shim/es6-sham.min.js',
'src/js/lib/shim/es6-shim.min.js',
'src/js/lib/shim/json3.min.js'
]
},
commit: {
hostname: '//www.yourhostname.com',
mainHost: 'http://www.yourhostname.com'
}
}
})
}
文档
直接看 types 吧
import { YylConfig, Env } from 'yyl-config-types'
import { Alias } from './types'
export interface YylBaseInitConfigOption {
/** 当前路径 */
context: string
/** 环境变量 */
env?: Env
/** yyl.config */
yylConfig?: YylConfig
alias?: Alias
devServer?: {
port: number
}
}
export declare type YylBaseInitConfigProperty = Required<YylBaseInitConfigOption>