Skip to content

Conversation

@pascalduez
Copy link
Contributor

@pascalduez pascalduez commented Nov 16, 2025

If a user follow the Webpack installation guide at https://reshaped.so/docs/getting-started/integrations/webpack, it will get css-loader latest version: 7.1.2 at time of writing.
Which means the documented config will not work with Reshaped.
Since version 7.x css-loader changed quite a bit their CSS modules default handling.
See https://github.com/webpack/css-loader/releases/tag/v7.0.0
So to be able to be compatible with Reshaped sources import s from "./Component.module.css", this config is now required.

This should be updated on the Reshaped website as well, but I don't think its sources are available?

*/

const path = require("path");
const path = require("node:path");
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Best practice to prevent unintentionally loading a path module from node_modules.

output: {
path: path.resolve(__dirname, "dist"),
filename: "[name]-[hash].js",
filename: "[name]-[contenthash].js",
Copy link
Contributor Author

@pascalduez pascalduez Nov 16, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[hash] is deprecated and prints a DEP_WEBPACK_TEMPLATE_PATH_PLUGIN_REPLACE_PATH_VARIABLES_HASH warning in console.

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

Successfully merging this pull request may close these issues.

1 participant