const TransformPages = require('uni-read-pages')
transpileDependencies: ['z-paging']
const {
	webpack
} = new TransformPages()
module.exports = {

	devServer: {
		host: 'localhost',
		port: '8081',
		https: true,
		proxy: {
			'^/api.': {
				target: 'http://nywhcm.com/addons/wike_aging/public/index.php',
				changeOrigin: true
			},
		},
	},


	configureWebpack: {
		plugins: [
			new webpack.DefinePlugin({
				ROUTES: webpack.DefinePlugin.runtimeValue(() => {
					const tfPages = new TransformPages({
						includes: ['path', 'name', 'aliasPath', 'meta']
					});
					return JSON.stringify(tfPages.routes)
				}, true)
			})
		],
	}
}