This repository has been archived by the owner on Apr 9, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 30
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;
}; |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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: