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
Any chance to make it work with CRA? #42
Comments
|
It shouldn't be a problem using any CRA rewired library. |
|
It shouldn't be difficult to integrate This issue is more one for the CRA maintainers though and whether they want to support |
|
For reference, this is the code that's necessary to use treat in a CRA project via // config-overrides.js
const MiniCssExtractPlugin = require("mini-css-extract-plugin");
const TreatPlugin = require("treat/webpack-plugin");
module.exports = function override(config, env) {
const isEnvDevelopment = env === "development";
config.plugins.push(
new TreatPlugin({
outputLoaders: [
isEnvDevelopment ? require.resolve("style-loader") : MiniCssExtractPlugin.loader,
],
})
);
return config;
}; |

Hi. Thank you for the project.
This question is asked in every zero-runtime library out there. Can we make it work with CRA out of the box, without need to eject? Can we make use of babel macros for example?
I kind of know the answer already (the problem is inside webpack API) but I keep hoping for the best. This is not an issue more of a discussion.
The text was updated successfully, but these errors were encountered: