mirror of
https://github.com/element-plus/element-plus.git
synced 2024-12-21 02:50:11 +08:00
16f069ebbe
* Revert "build!: simplify build & support native esm import (#3900)"
This reverts commit fb94222bb4
.
* remove module
* Fix linter
* Add @element-plus/icons as dependency
* update pnpm lock file
* temporary lock element-plus at 1.1.0-beta.20
24 lines
588 B
TypeScript
24 lines
588 B
TypeScript
import path from 'path'
|
|
import type { Plugin } from 'rollup'
|
|
|
|
export function RollupResolveEntryPlugin(): Plugin {
|
|
return {
|
|
name: 'element-plus-entry-plugin',
|
|
transform(code, id) {
|
|
if (id.includes('packages')) {
|
|
return {
|
|
code: code.replace(
|
|
/@element-plus\/(components|directives|utils|hooks|tokens|locale)/g,
|
|
`${path.relative(
|
|
path.dirname(id),
|
|
path.resolve(__dirname, '../packages')
|
|
)}/$1`
|
|
),
|
|
map: null,
|
|
}
|
|
}
|
|
return { code, map: null }
|
|
},
|
|
}
|
|
}
|