Akryum / Akryum/vue-cli-plugin-apollo
Webpack Alias path is not working on apollo-server
- 主要语言
- JavaScript
- 星标
- 477
- 派生
- 109
- PR 合并指标
- 30 天内没有已合并 PR
描述
vue-cli default config for webpack is including this.
```
config.resolve.alias.set('@', path.resolve(__dirname, './src/'))
```
so I use @ in import on the client-side. It is working perfectly
```
import { Role } from '@/utils/enum'
```
but when I use it in apollo-server (i use it in data-sources.js)
It is not working. I got error msg like this.
```
projectDir\node_modules\@vue\cli-service\bin\vue-cli-service.js
at Object. (projectDir\apollo-server\data-sources.js:1) {
code: 'MODULE_NOT_FOUND',
requireStack: [
'projectDir\\apollo-server\\data-sources.js',
'projectDir\\node_modules\\vue-cli-plugin-apollo\\utils\\load.js',
'projectDir\\node_modules\\vue-cli-plugin-apollo\\graphql-server\\index.js',
'projectDir\\node_modules\\vue-cli-plugin-apollo\\index.js',
'projectDir\\node_modules\\@vue\\cli-service\\lib\\Service.js',
'projectDir\\node_modules\\@vue\\cli-service\\bin\\vue-cli-service.js'
]
}
```
Is it a bug?
If not, pls tell me how to config alias for apollo-server.
贡献指南
这个仓库没有索引到贡献指南
评估
这个 Issue 还没有评估数据。