Giter VIP home page Giter VIP logo

Comments (4)

jxnblk avatar jxnblk commented on August 15, 2024 2

I think a good approach is to:

  1. Add a --webpack option to the CLI to point to a custom config
  2. Automatically look for a webpack.config.js from the CLI using find-up as done here in x0
  3. Use webpack-merge to merge with the built-in config, making sure mdx-deck/loader is still used

from mdx-deck.

jxnblk avatar jxnblk commented on August 15, 2024 1

Yeah, I'll likely add support for custom webpack.config.js from the CLI and would accept a PR for this

from mdx-deck.

mmmeff avatar mmmeff commented on August 15, 2024

Would love this as well, this is necessary for adding typescript support.

For an implementation example, see how https://github.com/pedronauck/docz implemented support for a typescript: true flag in their configuration as well as custom webpack loader options.

from mdx-deck.

connor-baer avatar connor-baer commented on August 15, 2024

Hey @jxnblk, I'd love to give this a shot. I can see two options for implementing support for custom webpack configs:

  • Automatically use a webpack.config.js file if it exists. Pros: easy to use, very flexible. Cons: Overrides default webpack config fully, so the default config has to be reimplemented & kept up to date.
  • Replicate Next.js' approach: A custom config file that exports a function which receives the default config as an argument and returns the modified config. Pros: No need to reimplement the default config. Cons: less intuitive.

WDYT? Which approach do you prefer or did you have something completely different in mind?

from mdx-deck.

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.