Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
genary
uni-app
提交
e847af40
U
uni-app
项目概览
genary
/
uni-app
与 Fork 源项目一致
Fork自
DCloud / uni-app
通知
1
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
U
uni-app
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
e847af40
编写于
7月 31, 2021
作者:
fxy060608
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
wip(app): nvue
上级
5f477c82
变更
45
隐藏空白更改
内联
并排
Showing
45 changed file
with
560 addition
and
387 deletion
+560
-387
packages/shims-node.d.ts
packages/shims-node.d.ts
+0
-1
packages/uni-app-vite/dist/plugin/configResolved.js
packages/uni-app-vite/dist/plugin/configResolved.js
+0
-8
packages/uni-app-vite/src/plugin/configResolved.ts
packages/uni-app-vite/src/plugin/configResolved.ts
+0
-12
packages/uni-cli-nvue/dist/types.js
packages/uni-cli-nvue/dist/types.js
+1
-0
packages/uni-cli-nvue/dist/utils/env.js
packages/uni-cli-nvue/dist/utils/env.js
+9
-0
packages/uni-cli-nvue/dist/webpack/config/index.js
packages/uni-cli-nvue/dist/webpack/config/index.js
+4
-2
packages/uni-cli-nvue/dist/webpack/config/module/index.js
packages/uni-cli-nvue/dist/webpack/config/module/index.js
+2
-2
packages/uni-cli-nvue/dist/webpack/config/module/rules/babelLoader.js
...-cli-nvue/dist/webpack/config/module/rules/babelLoader.js
+8
-0
packages/uni-cli-nvue/dist/webpack/config/module/rules/cssLoader/index.js
...-nvue/dist/webpack/config/module/rules/cssLoader/index.js
+16
-16
packages/uni-cli-nvue/dist/webpack/config/module/rules/cssLoader/oneOf.js
...-nvue/dist/webpack/config/module/rules/cssLoader/oneOf.js
+14
-9
packages/uni-cli-nvue/dist/webpack/config/module/rules/index.js
...es/uni-cli-nvue/dist/webpack/config/module/rules/index.js
+2
-2
packages/uni-cli-nvue/dist/webpack/config/module/rules/vueLoader/compilerOptions/index.js
...ck/config/module/rules/vueLoader/compilerOptions/index.js
+2
-2
packages/uni-cli-nvue/dist/webpack/config/module/rules/vueLoader/compilerOptions/modules/index.js
...g/module/rules/vueLoader/compilerOptions/modules/index.js
+2
-2
packages/uni-cli-nvue/dist/webpack/config/module/rules/vueLoader/index.js
...-nvue/dist/webpack/config/module/rules/vueLoader/index.js
+10
-2
packages/uni-cli-nvue/dist/webpack/config/optimization.js
packages/uni-cli-nvue/dist/webpack/config/optimization.js
+1
-0
packages/uni-cli-nvue/dist/webpack/config/plugins/banner.js
packages/uni-cli-nvue/dist/webpack/config/plugins/banner.js
+5
-4
packages/uni-cli-nvue/dist/webpack/config/resolve.js
packages/uni-cli-nvue/dist/webpack/config/resolve.js
+24
-26
packages/uni-cli-nvue/dist/webpack/index.js
packages/uni-cli-nvue/dist/webpack/index.js
+8
-6
packages/uni-cli-nvue/dist/webpack/loader/preprocess.js
packages/uni-cli-nvue/dist/webpack/loader/preprocess.js
+4
-4
packages/uni-cli-nvue/dist/webpack/plugin/BannerPlugin.js
packages/uni-cli-nvue/dist/webpack/plugin/BannerPlugin.js
+41
-0
packages/uni-cli-nvue/lib/@vue/component-compiler-utils/dist/stylePlugins/remove-scoped.js
...mponent-compiler-utils/dist/stylePlugins/remove-scoped.js
+49
-53
packages/uni-cli-nvue/lib/@vue/component-compiler-utils/dist/stylePlugins/scoped.js
...@vue/component-compiler-utils/dist/stylePlugins/scoped.js
+99
-101
packages/uni-cli-nvue/lib/@vue/component-compiler-utils/dist/stylePlugins/trim.js
...b/@vue/component-compiler-utils/dist/stylePlugins/trim.js
+14
-17
packages/uni-cli-nvue/lib/weex-styler/index.js
packages/uni-cli-nvue/lib/weex-styler/index.js
+3
-3
packages/uni-cli-nvue/package.json
packages/uni-cli-nvue/package.json
+3
-1
packages/uni-cli-nvue/src/types.ts
packages/uni-cli-nvue/src/types.ts
+4
-0
packages/uni-cli-nvue/src/utils/env.ts
packages/uni-cli-nvue/src/utils/env.ts
+5
-0
packages/uni-cli-nvue/src/webpack/config/index.ts
packages/uni-cli-nvue/src/webpack/config/index.ts
+5
-2
packages/uni-cli-nvue/src/webpack/config/module/index.ts
packages/uni-cli-nvue/src/webpack/config/module/index.ts
+4
-2
packages/uni-cli-nvue/src/webpack/config/module/rules/babelLoader.ts
...i-cli-nvue/src/webpack/config/module/rules/babelLoader.ts
+8
-1
packages/uni-cli-nvue/src/webpack/config/module/rules/cssLoader/index.ts
...i-nvue/src/webpack/config/module/rules/cssLoader/index.ts
+16
-16
packages/uni-cli-nvue/src/webpack/config/module/rules/cssLoader/oneOf.ts
...i-nvue/src/webpack/config/module/rules/cssLoader/oneOf.ts
+14
-9
packages/uni-cli-nvue/src/webpack/config/module/rules/index.ts
...ges/uni-cli-nvue/src/webpack/config/module/rules/index.ts
+2
-2
packages/uni-cli-nvue/src/webpack/config/module/rules/vueLoader/compilerOptions/index.ts
...ck/config/module/rules/vueLoader/compilerOptions/index.ts
+4
-2
packages/uni-cli-nvue/src/webpack/config/module/rules/vueLoader/compilerOptions/modules/index.ts
...g/module/rules/vueLoader/compilerOptions/modules/index.ts
+2
-2
packages/uni-cli-nvue/src/webpack/config/module/rules/vueLoader/index.ts
...i-nvue/src/webpack/config/module/rules/vueLoader/index.ts
+10
-2
packages/uni-cli-nvue/src/webpack/config/optimization.ts
packages/uni-cli-nvue/src/webpack/config/optimization.ts
+1
-0
packages/uni-cli-nvue/src/webpack/config/plugins/banner.ts
packages/uni-cli-nvue/src/webpack/config/plugins/banner.ts
+1
-3
packages/uni-cli-nvue/src/webpack/config/resolve.ts
packages/uni-cli-nvue/src/webpack/config/resolve.ts
+21
-26
packages/uni-cli-nvue/src/webpack/index.ts
packages/uni-cli-nvue/src/webpack/index.ts
+11
-6
packages/uni-cli-nvue/src/webpack/loader/preprocess.ts
packages/uni-cli-nvue/src/webpack/loader/preprocess.ts
+10
-5
packages/uni-cli-nvue/src/webpack/plugin/BannerPlugin.ts
packages/uni-cli-nvue/src/webpack/plugin/BannerPlugin.ts
+49
-0
packages/vite-plugin-uni/src/cli/action.ts
packages/vite-plugin-uni/src/cli/action.ts
+1
-26
packages/vite-plugin-uni/src/cli/nvue.ts
packages/vite-plugin-uni/src/cli/nvue.ts
+47
-0
yarn.lock
yarn.lock
+24
-10
未找到文件。
packages/shims-node.d.ts
浏览文件 @
e847af40
...
...
@@ -9,6 +9,5 @@ declare namespace NodeJS {
UNI_CLI_CONTEXT
:
string
UNI_COMPILER_VERSION
:
string
UNI_HBUILDERX_PLUGINS
:
string
UNI_NVUE_COMPILER
:
'
uni-app
'
|
'
weex
'
}
}
packages/uni-app-vite/dist/plugin/configResolved.js
浏览文件 @
e847af40
"
use strict
"
;
Object
.
defineProperty
(
exports
,
"
__esModule
"
,
{
value
:
true
});
exports
.
configResolved
=
void
0
;
const
uni_cli_shared_1
=
require
(
"
@dcloudio/uni-cli-shared
"
);
const
asset_1
=
require
(
"
../plugins/vitejs/plugins/asset
"
);
const
css_1
=
require
(
"
../plugins/vitejs/plugins/css
"
);
const
configResolved
=
(
config
)
=>
{
const
manifestJson
=
uni_cli_shared_1
.
parseManifestJsonOnce
(
process
.
env
.
UNI_INPUT_DIR
);
if
(
uni_cli_shared_1
.
getNVueCompiler
(
manifestJson
)
===
'
uni-app
'
)
{
process
.
env
.
UNI_USING_NVUE_COMPILER
=
'
uni-app
'
;
}
if
(
uni_cli_shared_1
.
getNVueStyleCompiler
(
manifestJson
)
===
'
uni-app
'
)
{
process
.
env
.
UNI_USING_NVUE_STYLE_COMPILER
=
'
uni-app
'
;
}
if
(
process
.
env
.
UNI_APP_CODE_SPLITING
)
{
initCodeSpliting
(
config
);
}
...
...
packages/uni-app-vite/src/plugin/configResolved.ts
浏览文件 @
e847af40
import
{
Plugin
,
ResolvedConfig
}
from
'
vite
'
import
{
parseManifestJsonOnce
,
getNVueCompiler
,
getNVueStyleCompiler
,
}
from
'
@dcloudio/uni-cli-shared
'
import
{
assetPlugin
}
from
'
../plugins/vitejs/plugins/asset
'
import
{
cssPlugin
,
cssPostPlugin
}
from
'
../plugins/vitejs/plugins/css
'
export
const
configResolved
:
Plugin
[
'
configResolved
'
]
=
(
config
)
=>
{
const
manifestJson
=
parseManifestJsonOnce
(
process
.
env
.
UNI_INPUT_DIR
)
if
(
getNVueCompiler
(
manifestJson
)
===
'
uni-app
'
)
{
process
.
env
.
UNI_USING_NVUE_COMPILER
=
'
uni-app
'
}
if
(
getNVueStyleCompiler
(
manifestJson
)
===
'
uni-app
'
)
{
process
.
env
.
UNI_USING_NVUE_STYLE_COMPILER
=
'
uni-app
'
}
if
(
process
.
env
.
UNI_APP_CODE_SPLITING
)
{
initCodeSpliting
(
config
as
ResolvedConfig
)
}
else
{
...
...
packages/uni-cli-nvue/dist/types.js
0 → 100644
浏览文件 @
e847af40
"
use strict
"
;
packages/uni-cli-nvue/dist/utils/env.js
0 → 100644
浏览文件 @
e847af40
"
use strict
"
;
Object
.
defineProperty
(
exports
,
"
__esModule
"
,
{
value
:
true
});
exports
.
initEnv
=
void
0
;
function
initEnv
(
options
)
{
if
(
options
.
styleCompiler
===
'
uni-app
'
)
{
process
.
env
.
UNI_NVUE_STYLE_COMPILER
=
'
uni-app
'
;
}
}
exports
.
initEnv
=
initEnv
;
packages/uni-cli-nvue/dist/webpack/config/index.js
浏览文件 @
e847af40
...
...
@@ -5,7 +5,8 @@ const optimization_1 = require("./optimization");
const
output_1
=
require
(
"
./output
"
);
const
module_1
=
require
(
"
./module
"
);
const
plugins_1
=
require
(
"
./plugins
"
);
function
createConfig
(
mode
)
{
const
resolve_1
=
require
(
"
./resolve
"
);
function
createConfig
(
mode
,
options
)
{
return
{
mode
:
mode
,
devtool
:
false
,
...
...
@@ -16,9 +17,10 @@ function createConfig(mode) {
externals
:
{
vue
:
'
Vue
'
,
},
module
:
module_1
.
createModule
(
options
),
optimization
:
optimization_1
.
createOptimization
(),
output
:
output_1
.
createOutput
(),
module
:
module_1
.
createModul
e
(),
resolve
:
resolve_1
.
createResolv
e
(),
plugins
:
plugins_1
.
createPlugins
(),
};
}
...
...
packages/uni-cli-nvue/dist/webpack/config/module/index.js
浏览文件 @
e847af40
...
...
@@ -2,9 +2,9 @@
Object
.
defineProperty
(
exports
,
"
__esModule
"
,
{
value
:
true
});
exports
.
createModule
=
void
0
;
const
rules_1
=
require
(
"
./rules
"
);
function
createModule
()
{
function
createModule
(
options
)
{
return
{
rules
:
rules_1
.
createRules
(),
rules
:
rules_1
.
createRules
(
options
),
};
}
exports
.
createModule
=
createModule
;
packages/uni-cli-nvue/dist/webpack/config/module/rules/babelLoader.js
浏览文件 @
e847af40
"
use strict
"
;
Object
.
defineProperty
(
exports
,
"
__esModule
"
,
{
value
:
true
});
exports
.
createBabelLoader
=
void
0
;
const
loader_1
=
require
(
"
../../../loader
"
);
const
preprocessLoader
=
{
loader
:
loader_1
.
resolveLoader
(
'
preprocess
'
),
options
:
{
type
:
[
'
js
'
],
},
};
function
createBabelLoader
()
{
return
{
test
:
/
\.
js$/
,
...
...
@@ -11,6 +18,7 @@ function createBabelLoader() {
babelrc
:
false
,
},
},
preprocessLoader
,
],
};
}
...
...
packages/uni-cli-nvue/dist/webpack/config/module/rules/cssLoader/index.js
浏览文件 @
e847af40
...
...
@@ -6,24 +6,24 @@ function createCssLoaders() {
return
[
{
test
:
/
\.
css$/
,
oneOf
:
oneOf_1
.
createOneOf
()
oneOf
:
oneOf_1
.
createOneOf
()
,
},
{
test
:
/
\.
scss$/
,
oneOf
:
oneOf_1
.
createOneOf
(
scssLoader
)
oneOf
:
oneOf_1
.
createOneOf
(
scssLoader
)
,
},
{
test
:
/
\.
sass$/
,
oneOf
:
oneOf_1
.
createOneOf
(
sassLoader
)
oneOf
:
oneOf_1
.
createOneOf
(
sassLoader
)
,
},
{
test
:
/
\.
less$/
,
oneOf
:
oneOf_1
.
createOneOf
(
lessLoader
)
oneOf
:
oneOf_1
.
createOneOf
(
lessLoader
)
,
},
{
test
:
/
\.
styl
(
us
)?
$/
,
oneOf
:
oneOf_1
.
createOneOf
(
stylusLoader
)
}
oneOf
:
oneOf_1
.
createOneOf
(
stylusLoader
)
,
}
,
];
}
exports
.
createCssLoaders
=
createCssLoaders
;
...
...
@@ -33,9 +33,9 @@ const scssLoader = {
sourceMap
:
false
,
additionalData
:
'
@import "@/uni.scss";
'
,
sassOptions
:
{
outputStyle
:
'
expanded
'
}
}
outputStyle
:
'
expanded
'
,
}
,
}
,
};
const
sassLoader
=
{
loader
:
require
.
resolve
(
'
sass-loader
'
),
...
...
@@ -44,20 +44,20 @@ const sassLoader = {
additionalData
:
'
@import "@/uni.sass"
'
,
sassOptions
:
{
outputStyle
:
'
expanded
'
,
indentedSyntax
:
true
}
}
indentedSyntax
:
true
,
}
,
}
,
};
const
lessLoader
=
{
loader
:
require
.
resolve
(
'
less-loader
'
),
options
:
{
sourceMap
:
false
}
sourceMap
:
false
,
}
,
};
const
stylusLoader
=
{
loader
:
require
.
resolve
(
'
stylus-loader
'
),
options
:
{
sourceMap
:
false
,
preferPathResolver
:
'
webpack
'
}
preferPathResolver
:
'
webpack
'
,
}
,
};
packages/uni-cli-nvue/dist/webpack/config/module/rules/cssLoader/oneOf.js
浏览文件 @
e847af40
...
...
@@ -7,7 +7,12 @@ exports.createOneOf = void 0;
const
path_1
=
__importDefault
(
require
(
"
path
"
));
const
loader_1
=
require
(
"
../../../../loader
"
);
const
styleLoader
=
{
loader
:
loader_1
.
resolveLoader
(
'
style
'
)
};
const
preprocessLoader
=
{
loader
:
loader_1
.
resolveLoader
(
'
preprocess
'
)
};
const
preprocessLoader
=
{
loader
:
loader_1
.
resolveLoader
(
'
preprocess
'
),
options
:
{
type
:
[
'
js
'
],
},
};
const
postcssLoader
=
{
loader
:
require
.
resolve
(
'
postcss-loader
'
),
options
:
{
...
...
@@ -27,11 +32,11 @@ const postcssLoader = {
return
path_1
.
default
.
resolve
(
process
.
env
.
UNI_INPUT_DIR
,
id
.
substr
(
1
));
}
return
id
;
}
})
]
}
}
}
,
})
,
]
,
}
,
}
,
};
function
createOneOf
(
preLoader
)
{
const
use
=
[
styleLoader
,
preprocessLoader
];
...
...
@@ -42,11 +47,11 @@ function createOneOf(preLoader) {
return
[
{
resourceQuery
:
/
\?
vue/
,
use
use
,
},
{
use
}
use
,
}
,
];
}
exports
.
createOneOf
=
createOneOf
;
packages/uni-cli-nvue/dist/webpack/config/module/rules/index.js
浏览文件 @
e847af40
...
...
@@ -4,7 +4,7 @@ exports.createRules = void 0;
const
babelLoader_1
=
require
(
"
./babelLoader
"
);
const
cssLoader_1
=
require
(
"
./cssLoader
"
);
const
vueLoader_1
=
require
(
"
./vueLoader
"
);
function
createRules
()
{
return
[
vueLoader_1
.
createVueLoader
(),
babelLoader_1
.
createBabelLoader
(),
...
cssLoader_1
.
createCssLoaders
()];
function
createRules
(
options
)
{
return
[
vueLoader_1
.
createVueLoader
(
options
),
babelLoader_1
.
createBabelLoader
(),
...
cssLoader_1
.
createCssLoaders
()];
}
exports
.
createRules
=
createRules
;
packages/uni-cli-nvue/dist/webpack/config/module/rules/vueLoader/compilerOptions/index.js
浏览文件 @
e847af40
...
...
@@ -2,9 +2,9 @@
Object
.
defineProperty
(
exports
,
"
__esModule
"
,
{
value
:
true
});
exports
.
createCompilerOptions
=
void
0
;
const
modules_1
=
require
(
"
./modules
"
);
function
createCompilerOptions
()
{
function
createCompilerOptions
(
options
)
{
return
{
modules
:
modules_1
.
createModules
(),
modules
:
modules_1
.
createModules
(
options
),
};
}
exports
.
createCompilerOptions
=
createCompilerOptions
;
packages/uni-cli-nvue/dist/webpack/config/module/rules/vueLoader/compilerOptions/modules/index.js
浏览文件 @
e847af40
...
...
@@ -6,10 +6,10 @@ const boolAttr_1 = require("./boolAttr");
const
easycom_1
=
require
(
"
./easycom
"
);
const
renderWhole_1
=
require
(
"
./renderWhole
"
);
const
tags_1
=
require
(
"
./tags
"
);
function
createModules
()
{
function
createModules
(
options
)
{
// 先处理 easycom
const
modules
=
[
easycom_1
.
createEasycomModule
(),
renderWhole_1
.
createRenderWholeModule
()];
if
(
process
.
env
.
UNI_NVUE_COMPILER
===
'
uni-app
'
)
{
if
(
options
.
compiler
===
'
uni-app
'
)
{
modules
.
push
(
tags_1
.
createTagsModule
());
}
modules
.
push
(
assetUrl_1
.
createAssetUrlModule
());
...
...
packages/uni-cli-nvue/dist/webpack/config/module/rules/vueLoader/index.js
浏览文件 @
e847af40
...
...
@@ -6,7 +6,14 @@ const uni_cli_shared_1 = require("@dcloudio/uni-cli-shared");
const
compilerOptions_1
=
require
(
"
./compilerOptions
"
);
const
utils_1
=
require
(
"
../../../../../utils
"
);
const
easycom_1
=
require
(
"
./easycom
"
);
function
createVueLoader
()
{
const
loader_1
=
require
(
"
../../../../loader
"
);
const
preprocessLoader
=
{
loader
:
loader_1
.
resolveLoader
(
'
preprocess
'
),
options
:
{
type
:
[
'
js
'
,
'
html
'
],
},
};
function
createVueLoader
(
options
)
{
uni_cli_shared_1
.
initEasycomsOnce
(
process
.
env
.
UNI_INPUT_DIR
,
process
.
env
.
UNI_PLATFORM
);
return
{
test
:
[
/
\.
nvue
(\?[^
?
]
+
)?
$/
,
/
\.
vue
(\?[^
?
]
+
)?
$/
],
...
...
@@ -16,9 +23,10 @@ function createVueLoader() {
options
:
{
hotReload
:
false
,
compiler
:
createCompiler
(),
compilerOptions
:
compilerOptions_1
.
createCompilerOptions
(),
compilerOptions
:
compilerOptions_1
.
createCompilerOptions
(
options
),
},
},
preprocessLoader
,
],
};
}
...
...
packages/uni-cli-nvue/dist/webpack/config/optimization.js
浏览文件 @
e847af40
...
...
@@ -8,6 +8,7 @@ const terser_webpack_plugin_1 = __importDefault(require("terser-webpack-plugin")
function
createOptimization
()
{
return
{
nodeEnv
:
false
,
moduleIds
:
'
deterministic
'
,
minimizer
:
[
new
terser_webpack_plugin_1
.
default
({
terserOptions
:
{
...
...
packages/uni-cli-nvue/dist/webpack/config/plugins/banner.js
浏览文件 @
e847af40
"
use strict
"
;
var
__importDefault
=
(
this
&&
this
.
__importDefault
)
||
function
(
mod
)
{
return
(
mod
&&
mod
.
__esModule
)
?
mod
:
{
"
default
"
:
mod
};
};
Object
.
defineProperty
(
exports
,
"
__esModule
"
,
{
value
:
true
});
exports
.
createBannerPlugin
=
void
0
;
const
webpack_1
=
require
(
"
webpack
"
);
const
BannerPlugin_1
=
__importDefault
(
require
(
"
../../plugin/BannerPlugin
"
)
);
function
createBannerPlugin
()
{
return
new
webpack_1
.
BannerPlugin
({
return
new
BannerPlugin_1
.
default
({
banner
:
'
"use weex:vue";
'
,
raw
:
true
,
exclude
:
'
Vue
'
,
});
}
exports
.
createBannerPlugin
=
createBannerPlugin
;
packages/uni-cli-nvue/dist/webpack/config/resolve.js
浏览文件 @
e847af40
...
...
@@ -3,30 +3,28 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
return
(
mod
&&
mod
.
__esModule
)
?
mod
:
{
"
default
"
:
mod
};
};
Object
.
defineProperty
(
exports
,
"
__esModule
"
,
{
value
:
true
});
exports
.
r
esolve
=
void
0
;
exports
.
createR
esolve
=
void
0
;
const
path_1
=
__importDefault
(
require
(
"
path
"
));
const
uni_cli_shared_1
=
require
(
"
@dcloudio/uni-cli-shared
"
);
const
inputDir
=
process
.
env
.
UNI_INPUT_DIR
;
exports
.
resolve
=
{
extensions
:
[
'
.js
'
,
'
.nvue
'
,
'
.vue
'
,
'
.json
'
],
alias
:
{
'
@
'
:
inputDir
,
'
uni-pages
'
:
path_1
.
default
.
resolve
(
inputDir
,
'
pages.json
'
),
'
@dcloudio/uni-stat
'
:
require
.
resolve
(
'
@dcloudio/uni-stat
'
),
'
uni-app-style
'
:
uni_cli_shared_1
.
resolveMainPathOnce
(
inputDir
)
+
'
?
'
+
JSON
.
stringify
({
type
:
'
appStyle
'
,
}),
'
uni-stat-config
'
:
path_1
.
default
.
resolve
(
inputDir
,
'
pages.json
'
)
+
'
?
'
+
JSON
.
stringify
({
type
:
'
stat
'
,
}),
},
modules
:
[
'
node_modules
'
,
path_1
.
default
.
resolve
(
process
.
env
.
UNI_CLI_CONTEXT
,
'
node_modules
'
),
path_1
.
default
.
resolve
(
inputDir
,
'
node_modules
'
),
],
};
// import { resolveMainPathOnce } from '@dcloudio/uni-cli-shared'
function
createResolve
()
{
const
inputDir
=
process
.
env
.
UNI_INPUT_DIR
;
return
{
extensions
:
[
'
.js
'
,
'
.nvue
'
,
'
.vue
'
,
'
.json
'
],
alias
:
{
'
@
'
:
inputDir
,
// '@dcloudio/uni-stat': require.resolve('@dcloudio/uni-stat')
// 'uni-app-style':
// resolveMainPathOnce(inputDir) +
// '?' +
// JSON.stringify({
// type: 'appStyle'
// })
},
modules
:
[
'
node_modules
'
,
path_1
.
default
.
resolve
(
process
.
env
.
UNI_CLI_CONTEXT
,
'
node_modules
'
),
path_1
.
default
.
resolve
(
inputDir
,
'
node_modules
'
),
],
};
}
exports
.
createResolve
=
createResolve
;
packages/uni-cli-nvue/dist/webpack/index.js
浏览文件 @
e847af40
...
...
@@ -8,11 +8,13 @@ const webpack_1 = __importDefault(require("webpack"));
const
uni_shared_1
=
require
(
"
@dcloudio/uni-shared
"
);
const
config_1
=
require
(
"
./config
"
);
const
alias_1
=
require
(
"
./alias
"
);
const
env_1
=
require
(
"
../utils/env
"
);
const
initModuleAliasOnce
=
uni_shared_1
.
once
(
alias_1
.
initModuleAlias
);
function
runWebpack
(
mode
)
{
function
runWebpack
(
mode
,
options
)
{
env_1
.
initEnv
(
options
);
initModuleAliasOnce
();
return
new
Promise
((
resolve
,
reject
)
=>
{
webpack_1
.
default
(
config_1
.
createConfig
(
mode
),
(
err
,
stats
)
=>
{
webpack_1
.
default
(
config_1
.
createConfig
(
mode
,
options
),
(
err
,
stats
)
=>
{
if
(
err
)
{
return
reject
(
err
.
stack
||
err
);
}
...
...
@@ -31,11 +33,11 @@ function runWebpack(mode) {
});
});
}
function
runWebpackBuild
()
{
return
runWebpack
(
'
production
'
);
function
runWebpackBuild
(
options
)
{
return
runWebpack
(
'
production
'
,
options
);
}
exports
.
runWebpackBuild
=
runWebpackBuild
;
function
runWebpackDev
()
{
return
runWebpack
(
'
development
'
);
function
runWebpackDev
(
options
)
{
return
runWebpack
(
'
development
'
,
options
);
}
exports
.
runWebpackDev
=
runWebpackDev
;
packages/uni-cli-nvue/dist/webpack/loader/preprocess.js
浏览文件 @
e847af40
...
...
@@ -23,13 +23,13 @@ function preprocessLoader(content, map) {
function
preContent
(
type
,
content
)
{
switch
(
type
)
{
case
'
js
'
:
return
uni_cli_shared_1
.
preJs
(
content
);
return
uni_cli_shared_1
.
pre
NVue
Js
(
content
);
case
'
html
'
:
return
uni_cli_shared_1
.
preHtml
(
content
);
return
uni_cli_shared_1
.
pre
NVue
Html
(
content
);
case
'
css
'
:
return
uni_cli_shared_1
.
preCss
(
content
);
return
uni_cli_shared_1
.
pre
NVue
Css
(
content
);
case
'
json
'
:
return
uni_cli_shared_1
.
preJson
(
content
);
return
uni_cli_shared_1
.
pre
NVue
Json
(
content
);
}
return
content
;
}
...
...
packages/uni-cli-nvue/dist/webpack/plugin/BannerPlugin.js
0 → 100644
浏览文件 @
e847af40
"
use strict
"
;
Object
.
defineProperty
(
exports
,
"
__esModule
"
,
{
value
:
true
});
const
webpack_1
=
require
(
"
webpack
"
);
const
webpack_sources_1
=
require
(
"
webpack-sources
"
);
class
BannerPlugin
{
/**
* @param {BannerPluginArgument} options options object
*/
constructor
(
options
)
{
this
.
banner
=
()
=>
options
.
banner
;
}
/**
* Apply the plugin
* @param {Compiler} compiler the compiler instance
* @returns {void}
*/
apply
(
compiler
)
{
const
banner
=
this
.
banner
;
compiler
.
hooks
.
compilation
.
tap
(
'
BannerPlugin
'
,
(
compilation
)
=>
{
compilation
.
hooks
.
processAssets
.
tap
({
name
:
'
BannerPlugin
'
,
stage
:
webpack_1
.
Compilation
.
PROCESS_ASSETS_STAGE_OPTIMIZE_TRANSFER
,
},
()
=>
{
for
(
const
chunk
of
compilation
.
chunks
)
{
if
(
!
chunk
.
canBeInitial
())
{
continue
;
}
for
(
const
file
of
chunk
.
files
)
{
const
data
=
{
chunk
,
filename
:
file
,
};
const
comment
=
compilation
.
getPath
(
banner
,
data
);
compilation
.
updateAsset
(
file
,
(
old
)
=>
new
webpack_sources_1
.
ConcatSource
(
comment
,
'
\n
'
,
old
));
}
}
});
});
}
}
exports
.
default
=
BannerPlugin
;
packages/uni-cli-nvue/lib/@vue/component-compiler-utils/dist/stylePlugins/remove-scoped.js
浏览文件 @
e847af40
"
use strict
"
;
var
__importStar
=
(
this
&&
this
.
__importStar
)
||
function
(
mod
)
{
if
(
mod
&&
mod
.
__esModule
)
return
mod
;
var
result
=
{};
if
(
mod
!=
null
)
for
(
var
k
in
mod
)
if
(
Object
.
hasOwnProperty
.
call
(
mod
,
k
))
result
[
k
]
=
mod
[
k
];
result
[
"
default
"
]
=
mod
;
return
result
;
};
Object
.
defineProperty
(
exports
,
"
__esModule
"
,
{
value
:
true
});
const
postcss
=
__importStar
(
require
(
"
postcss
"
));
// postcss-selector-parser does have typings but it's problematic to work with.
const
selectorParser
=
require
(
'
postcss-selector-parser
'
);
exports
.
default
=
postcss
.
plugin
(
'
remove-scoped
'
,
(
options
)
=>
(
root
)
=>
{
root
.
each
(
function
rewriteSelector
(
node
)
{
if
(
!
node
.
selector
)
{
// handle media queries
if
(
node
.
type
===
'
atrule
'
)
{
if
(
node
.
name
===
'
media
'
||
node
.
name
===
'
supports
'
)
{
node
.
each
(
rewriteSelector
);
}
}
return
;
}
node
.
selector
=
selectorParser
((
selectors
)
=>
{
selectors
.
each
((
selector
)
=>
{
let
node
=
null
;
// find the last child node to insert attribute selector
selector
.
each
((
n
)
=>
{
// ">>>" combinator
// and /deep/ alias for >>>, since >>> doesn't work in SASS
if
(
n
.
type
===
'
combinator
'
&&
(
n
.
value
===
'
>>>
'
||
n
.
value
===
'
/deep/
'
))
{
n
.
value
=
'
'
;
n
.
spaces
.
before
=
n
.
spaces
.
after
=
''
;
return
false
;
}
// in newer versions of sass, /deep/ support is also dropped, so add a ::v-deep alias
if
(
n
.
type
===
'
pseudo
'
&&
n
.
value
===
'
::v-deep
'
)
{
n
.
value
=
n
.
spaces
.
before
=
n
.
spaces
.
after
=
''
;
return
false
;
}
if
(
n
.
type
!==
'
pseudo
'
&&
n
.
type
!==
'
combinator
'
)
{
node
=
n
;
exports
.
default
=
()
=>
{
return
{
postcssPlugin
:
'
remove-scoped
'
,
Once
(
root
)
{
root
.
each
(
function
rewriteSelector
(
node
)
{
if
(
!
node
.
selector
)
{
// handle media queries
if
(
node
.
type
===
'
atrule
'
)
{
if
(
node
.
name
===
'
media
'
||
node
.
name
===
'
supports
'
)
{
node
.
each
(
rewriteSelector
);
}
}
return
;
}
node
.
selector
=
selectorParser
((
selectors
)
=>
{
selectors
.
each
((
selector
)
=>
{
let
node
=
null
;
// find the last child node to insert attribute selector
selector
.
each
((
n
)
=>
{
// ">>>" combinator
// and /deep/ alias for >>>, since >>> doesn't work in SASS
if
(
n
.
type
===
'
combinator
'
&&
(
n
.
value
===
'
>>>
'
||
n
.
value
===
'
/deep/
'
))
{
n
.
value
=
'
'
;
n
.
spaces
.
before
=
n
.
spaces
.
after
=
''
;
return
false
;
}
// in newer versions of sass, /deep/ support is also dropped, so add a ::v-deep alias
if
(
n
.
type
===
'
pseudo
'
&&
n
.
value
===
'
::v-deep
'
)
{
n
.
value
=
n
.
spaces
.
before
=
n
.
spaces
.
after
=
''
;
return
false
;
}
if
(
n
.
type
!==
'
pseudo
'
&&
n
.
type
!==
'
combinator
'
)
{
node
=
n
;
}
});
if
(
node
)
{
node
.
spaces
.
after
=
''
;
}
else
{
// For deep selectors & standalone pseudo selectors,
// the attribute selectors are prepended rather than appended.
// So all leading spaces must be eliminated to avoid problems.
selector
.
first
.
spaces
.
before
=
''
;
}
});
}).
processSync
(
node
.
selector
);
});
if
(
node
)
{
node
.
spaces
.
after
=
''
;
}
else
{
// For deep selectors & standalone pseudo selectors,
// the attribute selectors are prepended rather than appended.
// So all leading spaces must be eliminated to avoid problems.
selector
.
first
.
spaces
.
before
=
''
;
}
});
}).
processSync
(
node
.
selector
);
});
});
}
}
}
packages/uni-cli-nvue/lib/@vue/component-compiler-utils/dist/stylePlugins/scoped.js
浏览文件 @
e847af40
"
use strict
"
;
var
__importStar
=
(
this
&&
this
.
__importStar
)
||
function
(
mod
)
{
if
(
mod
&&
mod
.
__esModule
)
return
mod
;
var
result
=
{};
if
(
mod
!=
null
)
for
(
var
k
in
mod
)
if
(
Object
.
hasOwnProperty
.
call
(
mod
,
k
))
result
[
k
]
=
mod
[
k
];
result
[
"
default
"
]
=
mod
;
return
result
;
};
Object
.
defineProperty
(
exports
,
"
__esModule
"
,
{
value
:
true
});
const
postcss
=
__importStar
(
require
(
"
postcss
"
));
// postcss-selector-parser does have typings but it's problematic to work with.
const
selectorParser
=
require
(
'
postcss-selector-parser
'
);
exports
.
default
=
postcss
.
plugin
(
'
add-id
'
,
(
options
)
=>
(
root
)
=>
{
const
id
=
options
;
const
keyframes
=
Object
.
create
(
null
);
root
.
each
(
function
rewriteSelector
(
node
)
{
if
(
!
node
.
selector
)
{
// handle media queries
if
(
node
.
type
===
'
atrule
'
)
{
if
(
node
.
name
===
'
media
'
||
node
.
name
===
'
supports
'
)
{
node
.
each
(
rewriteSelector
);
}
else
if
(
/-
?
keyframes$/
.
test
(
node
.
name
))
{
// register keyframes
keyframes
[
node
.
params
]
=
node
.
params
=
node
.
params
+
'
-
'
+
id
;
}
}
return
;
}
node
.
selector
=
selectorParser
((
selectors
)
=>
{
selectors
.
each
((
selector
)
=>
{
let
node
=
null
;
// find the last child node to insert attribute selector
selector
.
each
((
n
)
=>
{
// ">>>" combinator
// and /deep/ alias for >>>, since >>> doesn't work in SASS
if
(
n
.
type
===
'
combinator
'
&&
(
n
.
value
===
'
>>>
'
||
n
.
value
===
'
/deep/
'
))
{
n
.
value
=
'
'
;
n
.
spaces
.
before
=
n
.
spaces
.
after
=
''
;
return
false
;
}
// in newer versions of sass, /deep/ support is also dropped, so add a ::v-deep alias
if
(
n
.
type
===
'
pseudo
'
&&
n
.
value
===
'
::v-deep
'
)
{
n
.
value
=
n
.
spaces
.
before
=
n
.
spaces
.
after
=
''
;
return
false
;
}
if
(
n
.
type
!==
'
pseudo
'
&&
n
.
type
!==
'
combinator
'
)
{
node
=
n
;
exports
.
default
=
(
options
)
=>
{
return
{
postcssPlugin
:
'
add-id
'
,
Once
(
root
)
{
const
id
=
options
;
const
keyframes
=
Object
.
create
(
null
);
root
.
each
(
function
rewriteSelector
(
node
)
{
if
(
!
node
.
selector
)
{
// handle media queries
if
(
node
.
type
===
'
atrule
'
)
{
if
(
node
.
name
===
'
media
'
||
node
.
name
===
'
supports
'
)
{
node
.
each
(
rewriteSelector
);
}
else
if
(
/-
?
keyframes$/
.
test
(
node
.
name
))
{
// register keyframes
keyframes
[
node
.
params
]
=
node
.
params
=
node
.
params
+
'
-
'
+
id
;
}
}
});
if
(
node
)
{
node
.
spaces
.
after
=
''
;
}
else
{
// For deep selectors & standalone pseudo selectors,
// the attribute selectors are prepended rather than appended.
// So all leading spaces must be eliminated to avoid problems.
selector
.
first
.
spaces
.
before
=
''
;
}
// fixed by xxxxxx (h5,app-plus v3 平台继续使用 attribute,其他平台使用 className)
if
(
process
.
env
.
UNI_PLATFORM
===
'
h5
'
||
(
process
.
env
.
UNI_PLATFORM
===
'
app-plus
'
&&
process
.
env
.
UNI_USING_V3
)
){
selector
.
insertAfter
(
node
,
selectorParser
.
attribute
({
attribute
:
id
}));
}
else
{
selector
.
insertAfter
(
node
,
selectorParser
.
className
({
value
:
id
}));
return
;
}
node
.
selector
=
selectorParser
((
selectors
)
=>
{
selectors
.
each
((
selector
)
=>
{
let
node
=
null
;
// find the last child node to insert attribute selector
selector
.
each
((
n
)
=>
{
// ">>>" combinator
// and /deep/ alias for >>>, since >>> doesn't work in SASS
if
(
n
.
type
===
'
combinator
'
&&
(
n
.
value
===
'
>>>
'
||
n
.
value
===
'
/deep/
'
))
{
n
.
value
=
'
'
;
n
.
spaces
.
before
=
n
.
spaces
.
after
=
''
;
return
false
;
}
// in newer versions of sass, /deep/ support is also dropped, so add a ::v-deep alias
if
(
n
.
type
===
'
pseudo
'
&&
n
.
value
===
'
::v-deep
'
)
{
n
.
value
=
n
.
spaces
.
before
=
n
.
spaces
.
after
=
''
;
return
false
;
}
if
(
n
.
type
!==
'
pseudo
'
&&
n
.
type
!==
'
combinator
'
)
{
node
=
n
;
}
});
if
(
node
)
{
node
.
spaces
.
after
=
''
;
}
else
{
// For deep selectors & standalone pseudo selectors,
// the attribute selectors are prepended rather than appended.
// So all leading spaces must be eliminated to avoid problems.
selector
.
first
.
spaces
.
before
=
''
;
}
// fixed by xxxxxx (h5,app-plus v3 平台继续使用 attribute,其他平台使用 className)
if
(
process
.
env
.
UNI_PLATFORM
===
'
h5
'
||
(
process
.
env
.
UNI_PLATFORM
===
'
app-plus
'
&&
process
.
env
.
UNI_USING_V3
)
){
selector
.
insertAfter
(
node
,
selectorParser
.
attribute
({
attribute
:
id
}));
}
else
{
selector
.
insertAfter
(
node
,
selectorParser
.
className
({
value
:
id
}));
}
});
}).
processSync
(
node
.
selector
);
});
}).
processSync
(
node
.
selector
);
});
// If keyframes are found in this <style>, find and rewrite animation names
// in declarations.
// Caveat: this only works for keyframes and animation rules in the same
// <style> element.
if
(
Object
.
keys
(
keyframes
).
length
)
{
root
.
walkDecls
(
decl
=>
{
// individual animation-name declaration
if
(
/^
(
-
\w
+-
)?
animation-name$/
.
test
(
decl
.
prop
))
{
decl
.
value
=
decl
.
value
.
split
(
'
,
'
)
.
map
(
v
=>
keyframes
[
v
.
trim
()]
||
v
.
trim
())
.
join
(
'
,
'
);
}
// shorthand
if
(
/^
(
-
\w
+-
)?
animation$/
.
test
(
decl
.
prop
))
{
decl
.
value
=
decl
.
value
.
split
(
'
,
'
)
.
map
(
v
=>
{
const
vals
=
v
.
trim
().
split
(
/
\s
+/
);
const
i
=
vals
.
findIndex
(
val
=>
keyframes
[
val
]);
if
(
i
!==
-
1
)
{
vals
.
splice
(
i
,
1
,
keyframes
[
vals
[
i
]]);
return
vals
.
join
(
'
'
);
// If keyframes are found in this <style>, find and rewrite animation names
// in declarations.
// Caveat: this only works for keyframes and animation rules in the same
// <style> element.
if
(
Object
.
keys
(
keyframes
).
length
)
{
root
.
walkDecls
(
decl
=>
{
// individual animation-name declaration
if
(
/^
(
-
\w
+-
)?
animation-name$/
.
test
(
decl
.
prop
))
{
decl
.
value
=
decl
.
value
.
split
(
'
,
'
)
.
map
(
v
=>
keyframes
[
v
.
trim
()]
||
v
.
trim
())
.
join
(
'
,
'
);
}
else
{
return
v
;
// shorthand
if
(
/^
(
-
\w
+-
)?
animation$/
.
test
(
decl
.
prop
))
{
decl
.
value
=
decl
.
value
.
split
(
'
,
'
)
.
map
(
v
=>
{
const
vals
=
v
.
trim
().
split
(
/
\s
+/
);
const
i
=
vals
.
findIndex
(
val
=>
keyframes
[
val
]);
if
(
i
!==
-
1
)
{
vals
.
splice
(
i
,
1
,
keyframes
[
vals
[
i
]]);
return
vals
.
join
(
'
'
);
}
else
{
return
v
;
}
})
.
join
(
'
,
'
);
}
})
.
join
(
'
,
'
);
});
}
}
);
}
}
}
);
}
packages/uni-cli-nvue/lib/@vue/component-compiler-utils/dist/stylePlugins/trim.js
浏览文件 @
e847af40
"
use strict
"
;
var
__importStar
=
(
this
&&
this
.
__importStar
)
||
function
(
mod
)
{
if
(
mod
&&
mod
.
__esModule
)
return
mod
;
var
result
=
{};
if
(
mod
!=
null
)
for
(
var
k
in
mod
)
if
(
Object
.
hasOwnProperty
.
call
(
mod
,
k
))
result
[
k
]
=
mod
[
k
];
result
[
"
default
"
]
=
mod
;
return
result
;
};
Object
.
defineProperty
(
exports
,
"
__esModule
"
,
{
value
:
true
});
const
postcss
=
__importStar
(
require
(
"
postcss
"
));
exports
.
default
=
postcss
.
plugin
(
'
trim
'
,
()
=>
(
css
)
=>
{
css
.
walk
(({
type
,
raws
})
=>
{
if
(
type
===
'
rule
'
||
type
===
'
atrule
'
)
{
if
(
raws
.
before
)
raws
.
before
=
'
\n
'
;
if
(
raws
.
after
)
raws
.
after
=
'
\n
'
;
exports
.
default
=
()
=>
{
return
{
postcssPlugin
:
'
trim
'
,
Once
(
css
)
{
css
.
walk
(({
type
,
raws
})
=>
{
if
(
type
===
'
rule
'
||
type
===
'
atrule
'
)
{
if
(
raws
.
before
)
raws
.
before
=
'
\n
'
;
if
(
raws
.
after
)
raws
.
after
=
'
\n
'
;
}
});
}
}
);
}
);
}
}
\ No newline at end of file
packages/uni-cli-nvue/lib/weex-styler/index.js
浏览文件 @
e847af40
...
...
@@ -35,7 +35,7 @@ function convertLengthShorthand (rule, prop) {
* @param {*} index
*/
function
mergeStyle
(
object
,
classNames
,
preClassNames
,
ruleResult
,
prop
,
index
)
{
if
(
!
process
.
env
.
UNI_USING_NVUE_STYLE_COMPILER
)
{
if
(
process
.
env
.
UNI_NVUE_STYLE_COMPILER
!==
'
uni-app
'
)
{
object
[
classNames
]
=
object
[
classNames
]
||
{}
object
[
classNames
][
prop
]
=
ruleResult
[
prop
]
return
...
...
@@ -110,7 +110,7 @@ function parse (code, done) {
/* istanbul ignore else */
if
(
typeof
subResult
.
value
===
'
number
'
||
typeof
subResult
.
value
===
'
string
'
)
{
if
(
process
.
env
.
UNI_
USING_NVUE_STYLE_COMPILER
)
{
if
(
process
.
env
.
UNI_
NVUE_STYLE_COMPILER
===
'
uni-app
'
)
{
var
oldValue
=
ruleResult
[
camelCasedName
]
// 增加 important 权重信息
ruleResult
[
camelCasedName
]
=
Array
.
isArray
(
oldValue
)
&&
oldValue
[
1
]
>
importantWeight
?
oldValue
:
[
subResult
.
value
,
importantWeight
]
...
...
@@ -128,7 +128,7 @@ function parse (code, done) {
rule
.
selectors
.
forEach
(
function
(
selector
)
{
selector
=
selector
.
replace
(
/
\s
*
([\+\~\>])\s
*/g
,
'
$1
'
).
replace
(
/
\s
+/
,
'
'
)
// 支持组合选择器
const
res
=
selector
.
match
(
process
.
env
.
UNI_
USING_NVUE_STYLE_COMPILER
?
/^
((?:(?:\.[
A-Za-z0-9_
\-]
+
)
+
[\+\~\>
])
*
)((?:\.[
A-Za-z0-9_
\-\:]
+
)
+
)
$/
:
/^
(\.)([
A-Za-z0-9_
\-
:
]
+
)
$/
)
const
res
=
selector
.
match
(
process
.
env
.
UNI_
NVUE_STYLE_COMPILER
===
'
uni-app
'
?
/^
((?:(?:\.[
A-Za-z0-9_
\-]
+
)
+
[\+\~\>
])
*
)((?:\.[
A-Za-z0-9_
\-\:]
+
)
+
)
$/
:
/^
(\.)([
A-Za-z0-9_
\-
:
]
+
)
$/
)
if
(
res
)
{
var
preClassNames
=
res
[
1
]
var
classNames
=
res
[
2
]
...
...
packages/uni-cli-nvue/package.json
浏览文件 @
e847af40
...
...
@@ -47,10 +47,12 @@
"vue-hot-reload-api"
:
"^2.3.0"
,
"vue-style-loader"
:
"^4.1.0"
,
"vue-template-es2015-compiler"
:
"^1.9.0"
,
"webpack"
:
"^5.45.1"
"webpack"
:
"^5.45.1"
,
"webpack-sources"
:
"^3.1.2"
},
"devDependencies"
:
{
"@types/terser-webpack-plugin"
:
"^5.0.4"
,
"@types/webpack-sources"
:
"^2.1.1"
,
"vue-template-compiler"
:
"^2.6.14"
}
}
packages/uni-cli-nvue/src/types.ts
0 → 100644
浏览文件 @
e847af40
interface
NVueCompilerOptions
{
compiler
:
'
uni-app
'
|
'
weex
'
styleCompiler
:
'
uni-app
'
|
'
weex
'
}
packages/uni-cli-nvue/src/utils/env.ts
0 → 100644
浏览文件 @
e847af40
export
function
initEnv
(
options
:
NVueCompilerOptions
)
{
if
(
options
.
styleCompiler
===
'
uni-app
'
)
{
process
.
env
.
UNI_NVUE_STYLE_COMPILER
=
'
uni-app
'
}
}
packages/uni-cli-nvue/src/webpack/config/index.ts
浏览文件 @
e847af40
...
...
@@ -3,8 +3,10 @@ import { createOptimization } from './optimization'
import
{
createOutput
}
from
'
./output
'
import
{
createModule
}
from
'
./module
'
import
{
createPlugins
}
from
'
./plugins
'
import
{
createResolve
}
from
'
./resolve
'
export
function
createConfig
(
mode
:
'
production
'
|
'
development
'
mode
:
'
production
'
|
'
development
'
,
options
:
NVueCompilerOptions
):
Configuration
{
return
{
mode
:
mode
,
...
...
@@ -16,9 +18,10 @@ export function createConfig(
externals
:
{
vue
:
'
Vue
'
,
},
module
:
createModule
(
options
),
optimization
:
createOptimization
(),
output
:
createOutput
(),
module
:
createModul
e
(),
resolve
:
createResolv
e
(),
plugins
:
createPlugins
(),
}
}
packages/uni-cli-nvue/src/webpack/config/module/index.ts
浏览文件 @
e847af40
...
...
@@ -2,8 +2,10 @@ import { Configuration } from 'webpack'
import
{
createRules
}
from
'
./rules
'
export
function
createModule
():
Configuration
[
'
module
'
]
{
export
function
createModule
(
options
:
NVueCompilerOptions
):
Configuration
[
'
module
'
]
{
return
{
rules
:
createRules
(),
rules
:
createRules
(
options
),
}
}
packages/uni-cli-nvue/src/webpack/config/module/rules/babelLoader.ts
浏览文件 @
e847af40
import
{
RuleSetRule
}
from
'
webpack
'
import
{
resolveLoader
}
from
'
../../../loader
'
const
preprocessLoader
=
{
loader
:
resolveLoader
(
'
preprocess
'
),
options
:
{
type
:
[
'
js
'
],
},
}
export
function
createBabelLoader
():
RuleSetRule
{
return
{
test
:
/
\.
js$/
,
...
...
@@ -10,6 +16,7 @@ export function createBabelLoader(): RuleSetRule {
babelrc
:
false
,
},
},
preprocessLoader
,
],
}
}
packages/uni-cli-nvue/src/webpack/config/module/rules/cssLoader/index.ts
浏览文件 @
e847af40
...
...
@@ -5,24 +5,24 @@ export function createCssLoaders(): RuleSetRule[] {
return
[
{
test
:
/
\.
css$/
,
oneOf
:
createOneOf
()
oneOf
:
createOneOf
()
,
},
{
test
:
/
\.
scss$/
,
oneOf
:
createOneOf
(
scssLoader
)
oneOf
:
createOneOf
(
scssLoader
)
,
},
{
test
:
/
\.
sass$/
,
oneOf
:
createOneOf
(
sassLoader
)
oneOf
:
createOneOf
(
sassLoader
)
,
},
{
test
:
/
\.
less$/
,
oneOf
:
createOneOf
(
lessLoader
)
oneOf
:
createOneOf
(
lessLoader
)
,
},
{
test
:
/
\.
styl
(
us
)?
$/
,
oneOf
:
createOneOf
(
stylusLoader
)
}
oneOf
:
createOneOf
(
stylusLoader
)
,
}
,
]
}
...
...
@@ -32,9 +32,9 @@ const scssLoader = {
sourceMap
:
false
,
additionalData
:
'
@import "@/uni.scss";
'
,
sassOptions
:
{
outputStyle
:
'
expanded
'
}
}
outputStyle
:
'
expanded
'
,
}
,
}
,
}
const
sassLoader
=
{
...
...
@@ -44,22 +44,22 @@ const sassLoader = {
additionalData
:
'
@import "@/uni.sass"
'
,
sassOptions
:
{
outputStyle
:
'
expanded
'
,
indentedSyntax
:
true
}
}
indentedSyntax
:
true
,
}
,
}
,
}
const
lessLoader
=
{
loader
:
require
.
resolve
(
'
less-loader
'
),
options
:
{
sourceMap
:
false
}
sourceMap
:
false
,
}
,
}
const
stylusLoader
=
{
loader
:
require
.
resolve
(
'
stylus-loader
'
),
options
:
{
sourceMap
:
false
,
preferPathResolver
:
'
webpack
'
}
preferPathResolver
:
'
webpack
'
,
}
,
}
packages/uni-cli-nvue/src/webpack/config/module/rules/cssLoader/oneOf.ts
浏览文件 @
e847af40
...
...
@@ -2,7 +2,12 @@ import path from 'path'
import
{
resolveLoader
}
from
'
../../../../loader
'
const
styleLoader
=
{
loader
:
resolveLoader
(
'
style
'
)
}
const
preprocessLoader
=
{
loader
:
resolveLoader
(
'
preprocess
'
)
}
const
preprocessLoader
=
{
loader
:
resolveLoader
(
'
preprocess
'
),
options
:
{
type
:
[
'
js
'
],
},
}
const
postcssLoader
=
{
loader
:
require
.
resolve
(
'
postcss-loader
'
),
options
:
{
...
...
@@ -20,11 +25,11 @@ const postcssLoader = {
return
path
.
resolve
(
process
.
env
.
UNI_INPUT_DIR
,
id
.
substr
(
1
))
}
return
id
}
})
]
}
}
}
,
})
,
]
,
}
,
}
,
}
export
function
createOneOf
(
preLoader
?:
{
loader
:
string
...
...
@@ -38,10 +43,10 @@ export function createOneOf(preLoader?: {
return
[
{
resourceQuery
:
/
\?
vue/
,
use
use
,
},
{
use
}
use
,
}
,
]
}
packages/uni-cli-nvue/src/webpack/config/module/rules/index.ts
浏览文件 @
e847af40
...
...
@@ -2,6 +2,6 @@ import { RuleSetRule } from 'webpack'
import
{
createBabelLoader
}
from
'
./babelLoader
'
import
{
createCssLoaders
}
from
'
./cssLoader
'
import
{
createVueLoader
}
from
'
./vueLoader
'
export
function
createRules
():
RuleSetRule
[]
{
return
[
createVueLoader
(),
createBabelLoader
(),
...
createCssLoaders
()]
export
function
createRules
(
options
:
NVueCompilerOptions
):
RuleSetRule
[]
{
return
[
createVueLoader
(
options
),
createBabelLoader
(),
...
createCssLoaders
()]
}
packages/uni-cli-nvue/src/webpack/config/module/rules/vueLoader/compilerOptions/index.ts
浏览文件 @
e847af40
import
{
CompilerOptions
}
from
'
vue-template-compiler
'
import
{
createModules
}
from
'
./modules
'
export
function
createCompilerOptions
():
CompilerOptions
{
export
function
createCompilerOptions
(
options
:
NVueCompilerOptions
):
CompilerOptions
{
return
{
modules
:
createModules
(),
modules
:
createModules
(
options
),
}
}
packages/uni-cli-nvue/src/webpack/config/module/rules/vueLoader/compilerOptions/modules/index.ts
浏览文件 @
e847af40
...
...
@@ -4,10 +4,10 @@ import { createBoolAttrModule } from './boolAttr'
import
{
createEasycomModule
}
from
'
./easycom
'
import
{
createRenderWholeModule
}
from
'
./renderWhole
'
import
{
createTagsModule
}
from
'
./tags
'
export
function
createModules
():
ModuleOptions
[]
{
export
function
createModules
(
options
:
NVueCompilerOptions
):
ModuleOptions
[]
{
// 先处理 easycom
const
modules
=
[
createEasycomModule
(),
createRenderWholeModule
()]
if
(
process
.
env
.
UNI_NVUE_COMPILER
===
'
uni-app
'
)
{
if
(
options
.
compiler
===
'
uni-app
'
)
{
modules
.
push
(
createTagsModule
())
}
...
...
packages/uni-cli-nvue/src/webpack/config/module/rules/vueLoader/index.ts
浏览文件 @
e847af40
...
...
@@ -6,8 +6,15 @@ import { createCompilerOptions } from './compilerOptions'
import
{
resolveLib
}
from
'
../../../../../utils
'
import
{
generateEasycomCode
}
from
'
./easycom
'
import
{
VueLoaderOptions
}
from
'
../../../../../../lib/vue-loader
'
import
{
resolveLoader
}
from
'
../../../../loader
'
const
preprocessLoader
=
{
loader
:
resolveLoader
(
'
preprocess
'
),
options
:
{
type
:
[
'
js
'
,
'
html
'
],
},
}
export
function
createVueLoader
():
RuleSetRule
{
export
function
createVueLoader
(
options
:
NVueCompilerOptions
):
RuleSetRule
{
initEasycomsOnce
(
process
.
env
.
UNI_INPUT_DIR
,
process
.
env
.
UNI_PLATFORM
)
return
{
test
:
[
/
\.
nvue
(\?[^
?
]
+
)?
$/
,
/
\.
vue
(\?[^
?
]
+
)?
$/
],
...
...
@@ -17,9 +24,10 @@ export function createVueLoader(): RuleSetRule {
options
:
{
hotReload
:
false
,
compiler
:
createCompiler
(),
compilerOptions
:
createCompilerOptions
(),
compilerOptions
:
createCompilerOptions
(
options
),
}
as
VueLoaderOptions
,
},
preprocessLoader
,
],
}
}
...
...
packages/uni-cli-nvue/src/webpack/config/optimization.ts
浏览文件 @
e847af40
...
...
@@ -4,6 +4,7 @@ import { Configuration } from 'webpack'
export
function
createOptimization
():
Configuration
[
'
optimization
'
]
{
return
{
nodeEnv
:
false
,
// 禁用,由 define 统一设置
moduleIds
:
'
deterministic
'
,
minimizer
:
[
new
TerserPlugin
({
terserOptions
:
{
...
...
packages/uni-cli-nvue/src/webpack/config/plugins/banner.ts
浏览文件 @
e847af40
import
{
BannerPlugin
}
from
'
webpack
'
import
BannerPlugin
from
'
../../plugin/BannerPlugin
'
export
function
createBannerPlugin
()
{
return
new
BannerPlugin
({
banner
:
'
"use weex:vue";
'
,
raw
:
true
,
exclude
:
'
Vue
'
,
})
}
packages/uni-cli-nvue/src/webpack/config/resolve.ts
浏览文件 @
e847af40
import
path
from
'
path
'
import
{
Configuration
}
from
'
webpack
'
import
{
resolveMainPathOnce
}
from
'
@dcloudio/uni-cli-shared
'
const
inputDir
=
process
.
env
.
UNI_INPUT_DIR
export
const
resolve
:
Configuration
[
'
resolve
'
]
=
{
extensions
:
[
'
.js
'
,
'
.nvue
'
,
'
.vue
'
,
'
.json
'
],
alias
:
{
'
@
'
:
inputDir
,
'
uni-pages
'
:
path
.
resolve
(
inputDir
,
'
pages.json
'
),
'
@dcloudio/uni-stat
'
:
require
.
resolve
(
'
@dcloudio/uni-stat
'
),
'
uni-app-style
'
:
resolveMainPathOnce
(
inputDir
)
+
'
?
'
+
JSON
.
stringify
({
type
:
'
appStyle
'
,
}),
'
uni-stat-config
'
:
path
.
resolve
(
inputDir
,
'
pages.json
'
)
+
'
?
'
+
JSON
.
stringify
({
type
:
'
stat
'
,
}),
},
modules
:
[
'
node_modules
'
,
path
.
resolve
(
process
.
env
.
UNI_CLI_CONTEXT
,
'
node_modules
'
),
path
.
resolve
(
inputDir
,
'
node_modules
'
),
],
// import { resolveMainPathOnce } from '@dcloudio/uni-cli-shared'
export
function
createResolve
():
Configuration
[
'
resolve
'
]
{
const
inputDir
=
process
.
env
.
UNI_INPUT_DIR
return
{
extensions
:
[
'
.js
'
,
'
.nvue
'
,
'
.vue
'
,
'
.json
'
],
alias
:
{
'
@
'
:
inputDir
,
// '@dcloudio/uni-stat': require.resolve('@dcloudio/uni-stat')
// 'uni-app-style':
// resolveMainPathOnce(inputDir) +
// '?' +
// JSON.stringify({
// type: 'appStyle'
// })
},
modules
:
[
'
node_modules
'
,
path
.
resolve
(
process
.
env
.
UNI_CLI_CONTEXT
,
'
node_modules
'
),
path
.
resolve
(
inputDir
,
'
node_modules
'
),
],
}
}
packages/uni-cli-nvue/src/webpack/index.ts
浏览文件 @
e847af40
...
...
@@ -3,13 +3,18 @@ import { once } from '@dcloudio/uni-shared'
import
{
createConfig
}
from
'
./config
'
import
{
initModuleAlias
}
from
'
./alias
'
import
{
initEnv
}
from
'
../utils/env
'
const
initModuleAliasOnce
=
once
(
initModuleAlias
)
function
runWebpack
(
mode
:
'
production
'
|
'
development
'
)
{
function
runWebpack
(
mode
:
'
production
'
|
'
development
'
,
options
:
NVueCompilerOptions
)
{
initEnv
(
options
)
initModuleAliasOnce
()
return
new
Promise
((
resolve
,
reject
)
=>
{
webpack
(
createConfig
(
mode
),
(
err
,
stats
)
=>
{
webpack
(
createConfig
(
mode
,
options
),
(
err
,
stats
)
=>
{
if
(
err
)
{
return
reject
(
err
.
stack
||
err
)
}
...
...
@@ -32,10 +37,10 @@ function runWebpack(mode: 'production' | 'development') {
})
}
export
function
runWebpackBuild
()
{
return
runWebpack
(
'
production
'
)
export
function
runWebpackBuild
(
options
:
NVueCompilerOptions
)
{
return
runWebpack
(
'
production
'
,
options
)
}
export
function
runWebpackDev
()
{
return
runWebpack
(
'
development
'
)
export
function
runWebpackDev
(
options
:
NVueCompilerOptions
)
{
return
runWebpack
(
'
development
'
,
options
)
}
packages/uni-cli-nvue/src/webpack/loader/preprocess.ts
浏览文件 @
e847af40
import
{
LoaderContext
}
from
'
webpack
'
import
{
preJs
,
preCss
,
preHtml
,
preJson
}
from
'
@dcloudio/uni-cli-shared
'
import
{
preNVueJs
,
preNVueCss
,
preNVueHtml
,
preNVueJson
,
}
from
'
@dcloudio/uni-cli-shared
'
import
{
normalizePreprocessErrMsg
}
from
'
../../utils/preprocess
'
const
utils
=
require
(
'
loader-utils
'
)
function
preprocessLoader
(
this
:
LoaderContext
<
{}
>
,
content
:
string
,
map
:
any
)
{
...
...
@@ -25,13 +30,13 @@ function preContent(
)
{
switch
(
type
)
{
case
'
js
'
:
return
preJs
(
content
)
return
pre
NVue
Js
(
content
)
case
'
html
'
:
return
preHtml
(
content
)
return
pre
NVue
Html
(
content
)
case
'
css
'
:
return
preCss
(
content
)
return
pre
NVue
Css
(
content
)
case
'
json
'
:
return
preJson
(
content
)
return
pre
NVue
Json
(
content
)
}
return
content
}
...
...
packages/uni-cli-nvue/src/webpack/plugin/BannerPlugin.ts
0 → 100644
浏览文件 @
e847af40
import
{
Compilation
,
Compiler
}
from
'
webpack
'
import
{
ConcatSource
}
from
'
webpack-sources
'
interface
BannerPluginOptions
{
banner
:
string
}
export
default
class
BannerPlugin
{
private
banner
:
()
=>
string
/**
* @param {BannerPluginArgument} options options object
*/
constructor
(
options
:
BannerPluginOptions
)
{
this
.
banner
=
()
=>
options
.
banner
}
/**
* Apply the plugin
* @param {Compiler} compiler the compiler instance
* @returns {void}
*/
apply
(
compiler
:
Compiler
)
{
const
banner
=
this
.
banner
compiler
.
hooks
.
compilation
.
tap
(
'
BannerPlugin
'
,
(
compilation
)
=>
{
compilation
.
hooks
.
processAssets
.
tap
(
{
name
:
'
BannerPlugin
'
,
stage
:
Compilation
.
PROCESS_ASSETS_STAGE_OPTIMIZE_TRANSFER
,
},
()
=>
{
for
(
const
chunk
of
compilation
.
chunks
)
{
if
(
!
chunk
.
canBeInitial
())
{
continue
}
for
(
const
file
of
chunk
.
files
)
{
const
data
=
{
chunk
,
filename
:
file
,
}
const
comment
=
compilation
.
getPath
(
banner
,
data
)
compilation
.
updateAsset
(
file
,
(
old
)
=>
new
ConcatSource
(
comment
,
'
\n
'
,
old
as
any
)
as
any
)
}
}
}
)
})
}
}
packages/vite-plugin-uni/src/cli/action.ts
浏览文件 @
e847af40
...
...
@@ -2,35 +2,10 @@ import { extend } from '@vue/shared'
import
{
BuildOptions
,
ServerOptions
}
from
'
vite
'
import
{
CliOptions
}
from
'
.
'
import
{
build
,
buildSSR
}
from
'
./build
'
import
{
runNVue
}
from
'
./nvue
'
import
{
createServer
,
createSSRServer
}
from
'
./server
'
import
{
initEnv
}
from
'
./utils
'
async
function
runNVue
(
mode
:
'
prod
'
|
'
dev
'
)
{
let
hasCliNVue
=
false
try
{
if
(
require
.
resolve
(
'
@dcloudio/uni-cli-nvue
'
))
{
hasCliNVue
=
true
}
}
catch
(
e
)
{}
if
(
!
hasCliNVue
)
{
return
}
let
nvue
try
{
nvue
=
require
(
'
@dcloudio/uni-cli-nvue
'
)
}
catch
(
e
)
{
console
.
error
(
e
)
}
if
(
!
nvue
)
{
return
}
if
(
mode
===
'
prod
'
)
{
await
nvue
.
runWebpackBuild
()
}
else
{
await
nvue
.
runWebpackDev
()
}
}
export
async
function
runDev
(
options
:
CliOptions
&
ServerOptions
)
{
initEnv
(
'
dev
'
,
options
)
try
{
...
...
packages/vite-plugin-uni/src/cli/nvue.ts
0 → 100644
浏览文件 @
e847af40
import
{
parseManifestJsonOnce
,
getNVueCompiler
,
getNVueStyleCompiler
,
}
from
'
@dcloudio/uni-cli-shared
'
function
initNVueCompilerOptions
()
{
const
manifestJson
=
parseManifestJsonOnce
(
process
.
env
.
UNI_INPUT_DIR
)
const
nvueCompilerOptions
=
{
compiler
:
'
uni-app
'
,
styleCompiler
:
'
weex
'
,
}
if
(
getNVueCompiler
(
manifestJson
)
===
'
uni-app
'
)
{
nvueCompilerOptions
.
compiler
=
'
uni-app
'
}
if
(
getNVueStyleCompiler
(
manifestJson
)
===
'
uni-app
'
)
{
nvueCompilerOptions
.
styleCompiler
=
'
uni-app
'
}
return
nvueCompilerOptions
}
export
async
function
runNVue
(
mode
:
'
prod
'
|
'
dev
'
)
{
let
hasCliNVue
=
false
try
{
if
(
require
.
resolve
(
'
@dcloudio/uni-cli-nvue
'
))
{
hasCliNVue
=
true
}
}
catch
(
e
)
{}
if
(
!
hasCliNVue
)
{
return
}
let
nvue
try
{
nvue
=
require
(
'
@dcloudio/uni-cli-nvue
'
)
}
catch
(
e
)
{
console
.
error
(
e
)
}
if
(
!
nvue
)
{
return
}
const
options
=
initNVueCompilerOptions
()
if
(
mode
===
'
prod
'
)
{
await
nvue
.
runWebpackBuild
(
options
)
}
else
{
await
nvue
.
runWebpackDev
(
options
)
}
}
yarn.lock
浏览文件 @
e847af40
...
...
@@ -2423,9 +2423,9 @@
integrity sha512-iiUgKzV9AuaEkZqkOLDIvlQiL6ltuZd9tGcW3gwpnX8JbuiuhFlEGmmFXEXkN50Cvq7Os88IY2v0dkDqXYWVgA==
"@types/node@*":
version "16.4.
7
"
resolved "https://registry.yarnpkg.com/@types/node/-/node-16.4.
7.tgz#f7afa78769d4b477f5092d7c3468e2e8653d779c
"
integrity sha512-
aDDY54sst8sx47CWT6QQqIZp45yURq4dic0+HCYfYNcY5Ejlb/CLmFnRLfy3wQuYafOeh3lB/DAKaqRKBtcZm
A==
version "16.4.
8
"
resolved "https://registry.yarnpkg.com/@types/node/-/node-16.4.
8.tgz#ef4974f47524448428542365db2fe7b638f928e5
"
integrity sha512-
VL7RZyCpfYEmbyd3/Eq5RNYhZt7yoL1JThZQ3KzimzhLya2Qa86U1ZZmioNWAAjiz99z1ED1xF9NUV2srvfVr
A==
"@types/node@10.17.13":
version "10.17.13"
...
...
@@ -2515,6 +2515,11 @@
"@types/mime" "^1"
"@types/node" "*"
"@types/source-list-map@*":
version "0.1.2"
resolved "https://registry.yarnpkg.com/@types/source-list-map/-/source-list-map-0.1.2.tgz#0078836063ffaf17412349bba364087e0ac02ec9"
integrity sha512-K5K+yml8LTo9bWJI/rECfIPrGgxdpeNbj+d53lwN4QjW1MCwlkhUms+gtdzigTeUyBr09+u8BwOIY3MXvHdcsA==
"@types/stack-utils@^2.0.0":
version "2.0.1"
resolved "https://registry.yarnpkg.com/@types/stack-utils/-/stack-utils-2.0.1.tgz#20f18294f797f2209b5f65c8e3b5c8e8261d127c"
...
...
@@ -2535,6 +2540,15 @@
terser "^5.3.8"
webpack "^5.1.0"
"@types/webpack-sources@^2.1.1":
version "2.1.1"
resolved "https://registry.yarnpkg.com/@types/webpack-sources/-/webpack-sources-2.1.1.tgz#6af17e3a3ded71eec2b98008d7c12f498a0a4506"
integrity sha512-MjM1R6iuw8XaVbtkCBz0N349cyqBjJHCbQiOeppe3VBeFvxqs74RKHAVt9LkxTnUWc7YLZOEsUfPUnmK6SBPKQ==
dependencies:
"@types/node" "*"
"@types/source-list-map" "*"
source-map "^0.7.3"
"@types/yargs-parser@*":
version "20.2.1"
resolved "https://registry.yarnpkg.com/@types/yargs-parser/-/yargs-parser-20.2.1.tgz#3b9ce2489919d9e4fea439b76916abc34b2df129"
...
...
@@ -4319,9 +4333,9 @@ ee-first@1.1.1:
integrity sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=
electron-to-chromium@^1.3.723:
version "1.3.79
1
"
resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.79
1.tgz#e38f325ff22470bdcff34409d58c0baf9c2e3e93
"
integrity sha512-
Tdx7w1fZpeWOOBluK+kXTAKCXyc79K65RB6Zp0+sPSZZhDjXlrxfGlXrlMGVVQUrKCyEZFQs1UBBLNz5IdbF0
g==
version "1.3.79
2
"
resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.79
2.tgz#791b0d8fcf7411885d086193fb49aaef0c1594ca
"
integrity sha512-
RM2O2xrNarM7Cs+XF/OE2qX/aBROyOZqqgP+8FXMXSuWuUqCfUUzg7NytQrzZU3aSqk1Qq6zqnVkJsbfMkIat
g==
elliptic@^6.5.3:
version "6.5.4"
...
...
@@ -4531,9 +4545,9 @@ eslint-visitor-keys@^2.0.0:
integrity sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw==
eslint@^7.17.0:
version "7.3
1
.0"
resolved "https://registry.yarnpkg.com/eslint/-/eslint-7.3
1.0.tgz#f972b539424bf2604907a970860732c5d99d3aca
"
integrity sha512-
vafgJpSh2ia8tnTkNUkwxGmnumgckLh5aAbLa1xRmIn9+owi8qBNGKL+B881kNKNTy7FFqTEkpNkUvmw0n6Pk
A==
version "7.3
2
.0"
resolved "https://registry.yarnpkg.com/eslint/-/eslint-7.3
2.0.tgz#c6d328a14be3fb08c8d1d21e12c02fdb7a2a812d
"
integrity sha512-
VHZ8gX+EDfz+97jGcgyGCyRia/dPOd6Xh9yPv8Bl1+SoaIwD+a/vlrOmGRUyOYu7MwUhc7CxqeaDZU13S4+Ep
A==
dependencies:
"@babel/code-frame" "7.12.11"
"@eslint/eslintrc" "^0.4.3"
...
...
@@ -9978,7 +9992,7 @@ webidl-conversions@^6.1.0:
resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-6.1.0.tgz#9111b4d7ea80acd40f5270d666621afa78b69514"
integrity sha512-qBIvFLGiBpLjfwmYAaHPXsn+ho5xZnGvyGvsarywGNc8VyQJUMHJ8OBKGGrPER0okBeMDaan4mNBlgBROxuI8w==
webpack-sources@^3.1.1:
webpack-sources@^3.1.1
, webpack-sources@^3.1.2
:
version "3.1.2"
resolved "https://registry.yarnpkg.com/webpack-sources/-/webpack-sources-3.1.2.tgz#614c962ac45dfac7f0f482052db8324a6e0dc274"
integrity sha512-//DeuK5SzM6yFRXNOGK+4tX7QB8PghkL8kFBPyqSlN62oJOUkmby8ptV7+IBGH6BkIuIw5Rjd7OvvwZaoiF4ag==
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录