yfm-transform icon indicating copy to clipboard operation
yfm-transform copied to clipboard

Unnecessary resolve fallback of webpack in runtime version

Open makhnatkin opened this issue 1 year ago • 2 comments

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.

makhnatkin avatar Jul 31 '24 09:07 makhnatkin

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?

3y3 avatar Sep 05 '24 15:09 3y3

@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? 😄

makhnatkin avatar Oct 04 '24 11:10 makhnatkin