mirror of
https://github.com/tusen-ai/naive-ui.git
synced 2025-04-12 14:40:47 +08:00
fix(rollup): validate external by prefix
This commit is contained in:
parent
50d30f1d6a
commit
16a53f7902
@ -3,6 +3,10 @@ const { nodeResolve } = require('@rollup/plugin-node-resolve')
|
||||
const { terser } = require('rollup-plugin-terser')
|
||||
const replace = require('@rollup/plugin-replace')
|
||||
|
||||
function externalValidator (patterns) {
|
||||
return id => patterns.some(pattern => id.startsWith(pattern))
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
input: 'src/index.js',
|
||||
output: [
|
||||
@ -34,10 +38,9 @@ module.exports = {
|
||||
}
|
||||
})
|
||||
],
|
||||
external: [
|
||||
external: externalValidator([
|
||||
'async-validator',
|
||||
'date-fns',
|
||||
'date-fns/locale',
|
||||
'lodash-es',
|
||||
'vue',
|
||||
'treemate',
|
||||
@ -45,6 +48,7 @@ module.exports = {
|
||||
'@css-render/plugin-bem',
|
||||
'vueuc',
|
||||
'vooks',
|
||||
'vicons'
|
||||
]
|
||||
'vicons',
|
||||
'evtd'
|
||||
])
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user