mirror of
https://gitee.com/dcloud/uni-preset-vue
synced 2025-05-17 08:34:04 +08:00
feat: add babel-plugin-import
This commit is contained in:
parent
387a7c89e0
commit
eb01916a22
@ -1,7 +1,24 @@
|
|||||||
|
const plugins = []
|
||||||
|
process.UNI_LIBRARIES = process.UNI_LIBRARIES || ['uni-ui']
|
||||||
|
process.UNI_LIBRARIES.forEach(libraryName => {
|
||||||
|
plugins.push([
|
||||||
|
'import',
|
||||||
|
{
|
||||||
|
'libraryName': libraryName,
|
||||||
|
'customName': (name) => {
|
||||||
|
return `${libraryName}/lib/${name}/${name}`
|
||||||
|
}
|
||||||
|
}
|
||||||
|
])
|
||||||
|
})
|
||||||
module.exports = {
|
module.exports = {
|
||||||
presets: [
|
presets: [
|
||||||
['@vue/app', {
|
[
|
||||||
|
'@vue/app',
|
||||||
|
{
|
||||||
useBuiltIns: 'entry'
|
useBuiltIns: 'entry'
|
||||||
}]
|
}
|
||||||
]
|
]
|
||||||
|
],
|
||||||
|
plugins
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user