Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unnecessary resolve fallback of webpack in runtime version #473

Open
makhnatkin opened this issue Jul 31, 2024 · 2 comments
Open

Unnecessary resolve fallback of webpack in runtime version #473

makhnatkin opened this issue Jul 31, 2024 · 2 comments

Comments

@makhnatkin
Copy link
Contributor

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
Copy link
Member

3y3 commented Sep 5, 2024

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
Copy link
Contributor Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants