mirror of
https://gitee.com/dcloud/uni-preset-vue
synced 2025-04-09 23:33:10 +08:00
26 lines
489 B
JavaScript
26 lines
489 B
JavaScript
const plugins = []
|
|
process.UNI_LIBRARIES = process.UNI_LIBRARIES || ['@dcloudio/uni-ui']
|
|
process.UNI_LIBRARIES.forEach(libraryName => {
|
|
plugins.push([
|
|
'import',
|
|
{
|
|
'libraryName': libraryName,
|
|
'customName': (name) => {
|
|
return `${libraryName}/lib/${name}/${name}`
|
|
}
|
|
}
|
|
])
|
|
})
|
|
module.exports = {
|
|
presets: [
|
|
[
|
|
'@vue/app',
|
|
{
|
|
modules: 'commonjs',
|
|
useBuiltIns: 'entry'
|
|
}
|
|
]
|
|
],
|
|
plugins
|
|
}
|