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

Supports rspack #417

Open
3 tasks done
l246804 opened this issue Nov 13, 2024 · 1 comment
Open
3 tasks done

Supports rspack #417

l246804 opened this issue Nov 13, 2024 · 1 comment
Labels
Status: Proposal Request for comments

Comments

@l246804
Copy link

l246804 commented Nov 13, 2024

Clear and concise description of the problem

I want to support the rspack plugin, although webpack can still work in it, but it will inexplicably cause element-plus style import failure, I understand that it should be caused by incomplete compatibility? But when I don't import element-plus styles anymore, it works fine again...😅

Suggested solution

support the rspack plugin

Alternative

No response

Additional context

No response

Validations

  • Read the Contributing Guidelines.
  • Read the README
  • Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
@l246804 l246804 added the Status: Proposal Request for comments label Nov 13, 2024
@l246804
Copy link
Author

l246804 commented Nov 13, 2024

reproduce:

  1. pnpm create rsbuild@latest
  2. pnpm i element-plus @intlify/unplugin-vue-i18n
  3. update src/index.ts
import { createApp } from 'vue';
import App from './App.vue';
import './index.css';
import 'element-plus/theme-chalk/index.css'
import 'element-plus/theme-chalk/dark/css-vars.css'

import ElementPlus from 'element-plus'

createApp(App).use(ElementPlus).mount('#root');
  1. update rsbuild.config
import { defineConfig } from '@rsbuild/core';
import { pluginVue } from '@rsbuild/plugin-vue';
import vueI18n from '@intlify/unplugin-vue-i18n/webpack'

export default defineConfig({
  tools: {
    rspack: {
      plugins: [vueI18n()]
    }
  },

  plugins: [pluginVue()],
});
  1. pnpm dev or pnpm build
    image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Proposal Request for comments
Projects
None yet
Development

No branches or pull requests

1 participant