baudehlo / node-fs-ext

Extras missing from node's fs module
MIT License
101 stars 45 forks source link

Fix compatibility with webpack #104

Open LoganDark opened 2 years ago

LoganDark commented 2 years ago

Leaving out the .node extension leaves Webpack confused on which loader to use. Adding it back allows Webpack to recognize this module correctly as a native one.

justanotheranonymoususer commented 1 year ago

It would be great if it could be merged. For now, this workaround works for me:

Add this to webpack.config.js:

module.exports = {
    resolve: {
        alias: {
            './build/Release/fs-ext': './build/Release/fs-ext.node'
        }
    }
}