-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
TypeError: Property 'mkdirpSync' of object #<Object> is not a function #4
Comments
@kisenka -- Have you tried writing other webpack output to memory-fs? I've wanted to slightly retool this plugin to just add the stats output as a file like normal JS bundles are emitted and that ideally would just solve your issue too... |
@ryan-roemer yes, with the same result :( As the temporary solution I write stats file to the ordinary file system and seems like its the only way to deal with it. |
@kisenka -- Let me see what I can do ;) This is a use case that makes sense to support. If there were no |
@ryan-roemer if there is no webpack.config.js: var path = require('path');
var MemoryFs = require('webpack-dev-server/node_modules/webpack-dev-middleware/node_modules/memory-fs/lib/MemoryFileSystem');
...
{
plugins: [
{
apply: function (compiler) {
var targetPath = path.join(__dirname, '_assets', 'qwe'); // your custom path
compiler.plugin('after-emit', function (curCompiler, callback) {
var stats = curCompiler.getStats().toJson().assetsByChunkName;
var fs = compiler.outputFileSystem;
console.log(compiler.outputFileSystem instanceof MemoryFs); // true
fs.mkdirpSync(targetPath, function (err) {
if (err) console.log(err);
fs.writeFileSync(path.join(targetPath, 'test.json'), JSON.stringify(stats), 'utf-8', function() {});
});
});
}
}
]
} If you run webpack with this config - it works great, file Maybe @sokra can help us with this issue? :) |
Fixed in |
I am getting following error when starts webpack-dev-server:
Looks like it memory-fs issue but, maybe, you can help me with it?
Btw, It really cool feature to write stats file to memory fs! :)
The text was updated successfully, but these errors were encountered: