Skip to content

fix(module-compiler): support more exports#328

Open
wangcch wants to merge 1 commit into
vuejs:mainfrom
wangcch:fix-export-module
Open

fix(module-compiler): support more exports#328
wangcch wants to merge 1 commit into
vuejs:mainfrom
wangcch:fix-export-module

Conversation

@wangcch

@wangcch wangcch commented Mar 25, 2025

Copy link
Copy Markdown
Collaborator

from #327

Compile case:

repl link

export { default as dayjs } from 'dayjs';
export { default as dayjs2 } from 'dayjs';
export * as lodash from 'lodash-es';
export * as bo2 from './b.js'
export { a } from './b.js'
export { get, set } from 'lodash-es'

=>

import { set } from 'lodash-es';
import { get } from 'lodash-es';
import * as lodash from 'lodash-es';
import { default as dayjs2 } from 'dayjs';
import { default as dayjs } from 'dayjs';
const __module__ = __modules__["src/a.js"] = { [Symbol.toStringTag]: "Module" }

const __import_1__ = __modules__["src/b.js"]

__export__(__module__, "dayjs", () => dayjs)
__export__(__module__, "dayjs2", () => dayjs2)
__export__(__module__, "lodash", () => lodash)
__export__(__module__, "bo2", () => __import_1__)
__export__(__module__, "a", () => __import_1__.a)
__export__(__module__, "get", () => get)
__export__(__module__, "set", () => set)

@vercel

vercel Bot commented Mar 25, 2025

Copy link
Copy Markdown

@wangcch is attempting to deploy a commit to the vuejs Team on Vercel.

A member of the Team first needs to authorize it.

@pkg-pr-new

pkg-pr-new Bot commented Mar 25, 2025

Copy link
Copy Markdown

Open in Stackblitz

npm i https://pkg.pr.new/@vue/repl@328

commit: 2fd7af0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant