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