Use absolute path for imports

This commit is contained in:
Logan Yang 2023-04-03 22:18:24 -07:00
parent ec11114fdc
commit 5d1085ce55
6 changed files with 13 additions and 13 deletions

View file

@ -1,5 +1,5 @@
import React, { useState, useEffect } from 'react';
import { ChatMessage, SharedState } from '../sharedState';
import { ChatMessage, SharedState } from 'src/sharedState';
import axios from 'axios';

View file

@ -1,10 +1,10 @@
import { WorkspaceLeaf, ItemView } from 'obsidian';
import { SharedState } from '../sharedState';
import { SharedState } from 'src/sharedState';
import * as React from 'react';
import Chat from '../components/Chat';
import Chat from 'src/components/Chat';
import { createRoot, Root } from 'react-dom/client';
import { AppContext } from '../context';
import { CHAT_VIEWTYPE } from '../constants';
import { AppContext } from 'src/context';
import { CHAT_VIEWTYPE } from 'src/constants';
import CopilotPlugin, {CopilotSettings} from 'src/main';

View file

@ -1,6 +1,6 @@
import * as React from 'react';
import { App } from 'obsidian';
import { SharedState } from './sharedState';
import { SharedState } from 'src/sharedState';
// App context
export const AppContext = React.createContext<App | undefined>(undefined);

View file

@ -1,7 +1,7 @@
import * as React from 'react';
import { App } from 'obsidian';
import { AppContext, SharedStateContext } from './context';
import { SharedState } from './sharedState';
import { AppContext, SharedStateContext } from 'src/context';
import { SharedState } from 'src/sharedState';
// Custom hook to use the App context
export const useApp = (): App | undefined => {

View file

@ -1,8 +1,8 @@
import { Plugin, WorkspaceLeaf } from 'obsidian';
import { CopilotSettingTab } from './settings';
import { SharedState } from './sharedState';
import CopilotView from './components/CopilotView';
import { CHAT_VIEWTYPE } from './constants';
import { CopilotSettingTab } from 'src/settings';
import { SharedState } from 'src/sharedState';
import CopilotView from 'src/components/CopilotView';
import { CHAT_VIEWTYPE } from 'src/constants';
export interface CopilotSettings {

View file

@ -1,4 +1,4 @@
import CopilotPlugin from "./main";
import CopilotPlugin from "src/main";
import { App, PluginSettingTab, Setting, DropdownComponent } from "obsidian";
export class CopilotSettingTab extends PluginSettingTab {