chore(miniprogram): stores 层启用 @/ 路径别名 + webpack alias 配置
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import { defineConfig } from '@tarojs/cli';
|
||||
import path from 'path';
|
||||
|
||||
export default defineConfig(async (merge) => {
|
||||
const baseConfig = {
|
||||
@@ -13,6 +14,9 @@ export default defineConfig(async (merge) => {
|
||||
copy: { patterns: [], options: {} },
|
||||
framework: 'react',
|
||||
compiler: 'webpack5',
|
||||
alias: {
|
||||
'@': path.resolve(__dirname, '..', 'src'),
|
||||
},
|
||||
sass: {
|
||||
resource: ['src/styles/variables.scss'],
|
||||
},
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { create } from 'zustand';
|
||||
import Taro from '@tarojs/taro';
|
||||
import * as authApi from '../services/auth';
|
||||
import * as authApi from '@/services/auth';
|
||||
|
||||
interface BindPhoneResp {
|
||||
access_token: string;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { create } from 'zustand';
|
||||
import * as healthApi from '../services/health';
|
||||
import * as healthApi from '@/services/health';
|
||||
|
||||
interface HealthState {
|
||||
todaySummary: healthApi.TodaySummary | null;
|
||||
|
||||
Reference in New Issue
Block a user