arco-design / arco-plugins

Webpack / Vite plugins for Arco Design
https://arco.design
MIT License
68 stars 41 forks source link

@arco-plugins/vite-react is invalid #48

Closed vaynevayne closed 1 year ago

vaynevayne commented 1 year ago

Basic Info

What is expected?

this is not increment dist/assets/ArcoDateRange.5d14a6ee.css 109.62 KiB / gzip: 12.99 KiB

Steps to reproduce

// ArcoDateComponent.tsx 
import { DatePicker, RangePickerProps } from '@arco-design/web-react'

// https://vitejs.dev/config/
export default defineConfig(() => {
  return {
    plugins: [
      react({ fastRefresh: false }),
      vitePluginForArco({
        style: 'css',
      }),
    ],

    resolve: {

    },
    build: {
      // sourcemap: true,
      rollupOptions: {
        plugins: [
          process.env.Analyze === '1'
            ? visualizer({
                gzipSize: true,
              })
            : null,
        ].filter(Boolean),
      },
    },

  }
})
jinghm318 commented 1 year ago

@vaynevayne Could you provide a full demo?

vaynevayne commented 1 year ago

ArcoDateRange.5d14a6ee.css 109.62 KiB The file is too large. I thought it was a packaging problem. However, according to the extracted css file name, which has the same name as the component, it is inferred that the packaging is not a problem. This component css itself is 109.62kib.