Skip to content
This repository has been archived by the owner on Aug 20, 2024. It is now read-only.

npm package workaround #12

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions packages/react/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,14 @@ module.exports = function config({ config: webpackConfig }) {
});
}

// Workaround for npm's fs package
Copy link
Contributor

Choose a reason for hiding this comment

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

Have you verified that this works in your project? If so, can you add a comment here indicating that this is "so that webpack can handle *.json files."

request/request#1529 (comment)

webpackConfig.node = {
console: true,
fs: "empty",
net: "empty",
tls: "empty"
}

// Define the paths that exemplar will attempt to load
webpackConfig.plugins.push(new DefinePlugin(definitions));

Expand Down