File tree Expand file tree Collapse file tree 2 files changed +11
-7
lines changed
Expand file tree Collapse file tree 2 files changed +11
-7
lines changed Original file line number Diff line number Diff line change 22const path = require ( 'path' ) ;
33// eslint-disable-next-line @typescript-eslint/no-var-requires
44const styleJson = require ( './src/styles/antd.json' ) ;
5- // 转为es6模块 import项目运行不起来,先用require
5+ // 转为es6模块 import项目运行不起来
66
77module . exports = {
88 publicPath : './' ,
@@ -26,7 +26,7 @@ module.exports = {
2626 } ,
2727 toTypes : {
2828 host : 'http://zx.aiisx.com/dcaw/v2/api-docs' , // swagger地址
29- TypesPath : './types/api.ts' , // 生成的interface
29+ TypesPath : './src/ types/api.ts' , // 生成的interface
3030 } ,
3131 } ,
3232 // 解决按需引入插件css引入失败
Original file line number Diff line number Diff line change @@ -44,7 +44,7 @@ module.exports = (api, options) => {
4444 pluginOptions : {
4545 toTypes : {
4646 host : `${ options . serverPath } /${ options . productName } /v2/api-docs` ,
47- TypesPath : './types/api.ts' ,
47+ TypesPath : './src/ types/api.ts' ,
4848 } ,
4949 ftp : {
5050 host : '自行配置' ,
@@ -54,11 +54,15 @@ module.exports = (api, options) => {
5454 } ,
5555 css : {
5656 loaderOptions : {
57- less : {
58- lessOptions : {
59- javascriptEnabled : true ,
60- } ,
57+ less : {
58+ lessOptions : {
59+ modifyVars : styleJson ,
60+ javascriptEnabled : true ,
6161 } ,
62+ } ,
63+ stylus : {
64+ import : path . resolve ( __dirname , './src/styles/variable.styl' ) ,
65+ } ,
6266 } ,
6367 } ,
6468 } ,
You can’t perform that action at this time.
0 commit comments