修改相对路径别名

pull/392/head
lyswhut 2020-11-28 20:23:17 +08:00
parent 99bdf6d173
commit d8feb3e794
8 changed files with 20 additions and 13 deletions

View File

@ -9,9 +9,10 @@ module.exports = {
},
resolve: {
alias: {
'@': path.join(__dirname, '../../src/main'),
events: path.join(__dirname, '../../src/main/events'),
common: path.join(__dirname, '../../src/common'),
'@main': path.join(__dirname, '../../src/main'),
'@renderer': path.join(__dirname, '../../src/renderer'),
'@lyric': path.join(__dirname, '../../src/renderer-lyric'),
'@common': path.join(__dirname, '../../src/common'),
},
extensions: ['*', '.js', '.json', '.node'],
},

View File

@ -21,8 +21,11 @@ module.exports = {
},
resolve: {
alias: {
'@': path.join(__dirname, '../../src/renderer'),
common: path.join(__dirname, '../../src/common'),
'@main': path.join(__dirname, '../../src/main'),
'@renderer': path.join(__dirname, '../../src/renderer'),
'@lyric': path.join(__dirname, '../../src/renderer-lyric'),
'@static': path.join(__dirname, '../../src/static'),
'@common': path.join(__dirname, '../../src/common'),
},
extensions: ['*', '.js', '.json', '.vue', '.node'],
},

View File

@ -21,8 +21,11 @@ module.exports = {
},
resolve: {
alias: {
'@': path.join(__dirname, '../../src/renderer'),
common: path.join(__dirname, '../../src/common'),
'@main': path.join(__dirname, '../../src/main'),
'@renderer': path.join(__dirname, '../../src/renderer'),
'@lyric': path.join(__dirname, '../../src/renderer-lyric'),
'@static': path.join(__dirname, '../../src/static'),
'@common': path.join(__dirname, '../../src/common'),
},
extensions: ['*', '.js', '.json', '.vue', '.node'],
},

View File

@ -1,4 +1,4 @@
const names = require('../main/events/_name')
const names = require('@main/events/_name')
const hotKey = {
common: {
min: {

View File

@ -1,7 +1,7 @@
// http://kazupon.github.io/vue-i18n/en/messages.html
const requireLang = require.context(
'@/lang',
'@renderer/lang',
true,
/\.json$/,
)

View File

@ -17,7 +17,7 @@ import store from './store'
import '../common/error'
import { getSetting } from './utils'
import languageList from '@/lang/languages.json'
import languageList from '@renderer/lang/languages.json'
import { rendererSend, NAMES } from '../common/ipc'
sync(store, router)

View File

@ -9,7 +9,7 @@
// Lib imports
import Vue from 'vue'
import VueI18n from 'vue-i18n'
import messages from '@/lang'
import messages from '@renderer/lang'
Vue.use(VueI18n)

View File

@ -296,11 +296,11 @@ import {
sizeFormate,
setWindowSize,
} from '../utils'
import { rendererSend, rendererInvoke, NAMES } from '../../common/ipc'
import { rendererSend, rendererInvoke, NAMES } from '@common/ipc'
import { mergeSetting, isMac } from '../../common/utils'
import apiSourceInfo from '../utils/music/api-source-info'
import fs from 'fs'
import languageList from '@/lang/languages.json'
import languageList from '@renderer/lang/languages.json'
import { base as eventBaseName } from '../event/names'
import * as hotKeys from '../../common/hotKey'
import { mainWindow as eventsNameMainWindow, winLyric as eventsNameWinLyric } from '../../main/events/_name'