| | |
| | | import ComponentsPlugin from 'unplugin-vue-components/webpack'; |
| | | import NutUIResolver from '@nutui/nutui-taro/dist/resolver'; |
| | | |
| | | const rootPath = path.resolve(__dirname, '..', '..', '..'); |
| | | |
| | | const config = { |
| | | projectName: 'vue-mini', |
| | | date: '2022-11-29', |
| | |
| | | }, |
| | | alias: { |
| | | '@': path.resolve(__dirname, '..', 'src'), |
| | | '@life-payment/components': path.resolve( |
| | | __dirname, |
| | | '..', |
| | | 'node_modules', |
| | | '@life-payment/components' |
| | | ), |
| | | '@life-payment/components': path.resolve(rootPath, 'packages', 'components'), |
| | | }, |
| | | sourceRoot: 'src', |
| | | outputRoot: `dist/${process.env.TARO_ENV}`, |
| | |
| | | |
| | | chain.plugin('unplugin-auto-import').use( |
| | | AutoImport({ |
| | | imports: ['vue', 'pinia', 'vue-router', { '@/constants': ['RouterPath'] }], |
| | | imports: [ |
| | | 'vue', |
| | | 'pinia', |
| | | 'vue-router', |
| | | { '@/constants': ['RouterPath'] }, |
| | | { '@/utils': ['RouteHelper'] }, |
| | | ], |
| | | eslintrc: { |
| | | enabled: true, // Default `false` |
| | | filepath: './.eslintrc-auto-import.json', // Default `./.eslintrc-auto-import.json` |
| | |
| | | devServer: { |
| | | proxy: { |
| | | '/api': { |
| | | target: 'http://localhost:57190', // 目标服务器地址 |
| | | target: 'http://localhost:58190', // 目标服务器地址 |
| | | changeOrigin: true, |
| | | }, |
| | | }, |
| | |
| | | webpackChain(chain, webpack) { |
| | | chain.plugin('unplugin-auto-import').use( |
| | | AutoImport({ |
| | | imports: ['vue', 'pinia', 'vue-router', { '@/constants': ['RouterPath'] }], |
| | | imports: [ |
| | | 'vue', |
| | | 'pinia', |
| | | 'vue-router', |
| | | { '@/constants': ['RouterPath'] }, |
| | | { '@/utils': ['RouteHelper'] }, |
| | | ], |
| | | eslintrc: { |
| | | enabled: true, // Default `false` |
| | | filepath: './.eslintrc-auto-import.json', // Default `./.eslintrc-auto-import.json` |