Git Product home page Git Product logo

Comments (3)

phyng avatar phyng commented on July 21, 2024 1

@tajo Thank you for your reply, in my case, I use vite-plugin-imp to map component import, I know that although the babelPlugins can be used to achieve similar functions, it will be easier if I can customize the Vite plugin, and I don't need to maintain multiple configurations. But it doesn't matter if you are not convenient to support at this stage, I'll handle it myself.

My vite config:

import vitePluginImp from 'vite-plugin-imp'

const config = {
  plugins: {
    vitePluginImp({
      libList: [
        {
          libName: 'antd',
          style: (name) => `antd/es/${name}/style`
        }
      ]
    })
  }
}

The Vitebook Plugins is support both Vite Plugins and Rollup Plugins.

from ladle.

tajo avatar tajo commented on July 21, 2024

a generic method to customize all vite options

Many options are already available: https://www.ladle.dev/docs/config, we can add some more but it can't be all of them since some are unique to the ladle itself and make it work

config.css

Check https://www.ladle.dev/docs/css

from ladle.

cmseguin avatar cmseguin commented on July 21, 2024

@tajo in /packages/ladle/lib/cli/vite-base.js I see that you already added something for it, it would just be cool to allow to pass it through config.mjs

I personally need only the plugin part since we have some custom vite plugins that are required to render our lib.

Screen Shot 2022-03-29 at 1 39 37 PM

from ladle.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.