Skip to content

Commit

Permalink
fix: attempt to fix building issue
Browse files Browse the repository at this point in the history
  • Loading branch information
tikazyq committed Jun 24, 2024
1 parent 699039c commit e5ff005
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 16 deletions.
1 change: 0 additions & 1 deletion src/interfaces/package/create-app.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import { Store } from 'vuex';

export declare global {
interface CreateAppOptions {
initStylesheet?: boolean;
initBaiduTongji?: boolean;
initUmeng?: boolean;
initClarity?: boolean;
Expand Down
8 changes: 3 additions & 5 deletions src/package/create-app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,18 @@ import AppComp from './App.vue';
import { getStore } from '@/store';
import { getI18n } from '@/i18n';
import { initBaiduTonji } from '@/admin/baidu';
import { importStylesheets } from '@/package/utils';
import { getRouter } from '@/router';
import { initRequest } from '@/services/request';
import { initUmeng } from '@/admin/umeng';
import { setGlobalLang } from '@/utils/i18n';
import { track, locate, auth, export_ } from '@/directives';
import { initClarity } from '@/admin/clarity';
import 'normalize.css/normalize.css';
import 'element-plus/theme-chalk/index.css';
import '@/styles/index.scss';

export const getDefaultCreateAppOptions = (): CreateAppOptions => {
return {
initStylesheet: true,
initBaiduTongji: true,
initUmeng: true,
initClarity: true,
Expand Down Expand Up @@ -57,9 +58,6 @@ const _createApp = async (options?: CreateAppOptions): Promise<App> => {
// normalize options
options = normalizeOptions(options);

// import stylesheets
if (options.initStylesheet) importStylesheets();

// baidu tongji
if (options.initBaiduTongji) initBaiduTonji();

Expand Down
7 changes: 3 additions & 4 deletions src/package/make-installer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@ import { fab } from '@fortawesome/free-brands-svg-icons';
import { far } from '@fortawesome/free-regular-svg-icons';
import { fas } from '@fortawesome/free-solid-svg-icons';
import { FontAwesomeIcon } from '@fortawesome/vue-fontawesome';
import { importStylesheets } from '@/package/utils';
import 'normalize.css/normalize.css';
import 'element-plus/theme-chalk/index.css';
import '@/styles/index.scss';

// fontawesome
library.add(fab, far, fas);
Expand All @@ -17,9 +19,6 @@ const makeInstaller = (

// install function
const install = (app: App) => {
// import stylesheets
importStylesheets();

// skip if already exists in apps
if (apps.includes(app)) return;

Expand Down
6 changes: 0 additions & 6 deletions src/package/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,3 @@ export const mapElements = (elements: any) => {
name => [name, elements[name]] as [string, ComponentOptionsMixin]
);
};

export const importStylesheets = () => {
import('normalize.css/normalize.css');
import('element-plus/theme-chalk/index.css');
import('@/styles/index.scss');
};

0 comments on commit e5ff005

Please sign in to comment.