Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

打包后代码里还存在排除包文件 #12

Open
huangjihua opened this issue Nov 27, 2022 · 1 comment
Open

打包后代码里还存在排除包文件 #12

huangjihua opened this issue Nov 27, 2022 · 1 comment

Comments

@huangjihua
Copy link

image

@fengxinming
Copy link
Owner

fengxinming commented Nov 28, 2022

@huangjihua 可以具体描述一下怎么使用的吗?

是否类似以下配置

export default defineConfig({
  plugins: [
    createExternals({
      externals: {
        react: 'React',
        'react-dom': 'ReactDOM',
        'react-router': 'ReactRouter',
        'react-router-dom': 'ReactRouterDOM'
      }
    })
  ]
});

确认一下react-router有没有排出,最好贴一下你的配置

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

No branches or pull requests

2 participants