const path = require ( 'path' ) ; const alias = { '@/components' : path . resolve ( __dirname , '..' , 'src/components' ) , '@/assets' : path . resolve ( __dirname , '..' , 'src/assets' ) , '@/interfaces' : path . resolve ( __dirname , '..' , 'src/interfaces' ) , '@/services' : path . resolve ( __dirname , '..' , 'src/services' ) , '@/stores' : path . resolve ( __dirname , '..' , 'src/stores' ) , '@/utils' : path . resolve ( __dirname , '..' , 'src/utils' ) , '@/src' : path . resolve ( __dirname , '..' , 'src' ) } ; const sassImporter = function ( url ) { if ( url [ 0 ] === '~' && url [ 1 ] !== '/' ) { return { file : path . resolve ( __dirname , '..' , 'node_modules' , url . substr ( 1 ) ) } ; } return { file : url } ; } ; const config = { projectName : 'teashop-seller' , date : '2019-3-14' , designWidth : 750 , deviceRatio : { 640 : 2.34 / 2 , 750 : 1 , 828 : 1.81 / 2 } , alias , sourceRoot : 'src' , outputRoot : 'dist' , plugins : { babel : { sourceMap : true , presets : [ [ 'env' , { modules : false } ] ] , plugins : [ 'lodash' , 'transform-decorators-legacy' , 'transform-class-properties' , 'transform-object-rest-spread' ] } , sass : { importer : sassImporter } } , defineConstants : { } , copy : { patterns : [ ] , options : { } } , weapp : { module : { postcss : { autoprefixer : { enable : true , config : { browsers : [ 'last 3 versions' , 'Android >= 4.1' , 'ios >= 8' ] } } , pxtransform : { enable : true , config : { } } , url : { enable : true , config : { limit : 10240 } } , cssModules : { enable : false , config : { namingPattern : 'module' , generateScopedName : '[name]__[local]___[hash:base64:5]' } } } } } , h5 : { publicPath : '/' , staticDirectory : 'static' , esnextModules : [ 'taro-ui' ] , module : { postcss : { autoprefixer : { enable : true , config : { browsers : [ 'last 3 versions' , 'Android >= 4.1' , 'ios >= 8' ] } } , cssModules : { enable : false , config : { namingPattern : 'module' , generateScopedName : '[name]__[local]___[hash:base64:5]' } } } } } } ; module . exports = function ( merge ) { if ( process . env . NODE_ENV === 'development' ) { return merge ( { } , config , require ( './dev' ) ) ; } return merge ( { } , config , require ( './prod' ) ) ; } ;