diplodoc-platform / transform

Simple transformer YFM (Yandex Flavored Markdown) to HTML.
MIT License
57 stars 38 forks source link

Unnecessary resolve fallback of webpack in runtime version #473

Open makhnatkin opened 3 months ago

makhnatkin commented 3 months ago

In order for the transform to function properly at runtime, you will need to add some configurations to the webpack resolve fallback.

For example, if you are using CRA, you can do the following:

  1. install CRACO
npm install @craco/craco
  1. Create a file called craco.config.js in the root of the project and add the following configuration:
module.exports = {
  webpack: {
    configure: (webpackConfig) => {
      webpackConfig.resolve.fallback = {
        fs: false,
        process: false,
        path: false,
      };
      return webpackConfig;
    },
  },
};

I would like the installation process of the transform to be as straightforward as possible, without requiring any additional configuration steps for the webpack.

3y3 commented 1 month ago

We discussed some times about forking css package, inline it in transform and remove sourcemap helpers. https://github.com/reworkcss/css/blob/master/lib/stringify/source-map-support.js

What do you think about this solution?

makhnatkin commented 4 weeks ago

@3y3 we talked it over and decided it's not the best idea, so we suggested making a issue in https://github.com/reworkcss

What do you think about this solution? 😄