-
Notifications
You must be signed in to change notification settings - Fork 108
Crashing due to Critters.prototype.readFile vs. this$1.fs #7
Comments
Can you check if this still happens in |
Getting the same with Full error:
OSX, Node@8.9.1, NPM@6.2.0 |
I was having the same error because a css file I was loading in the html entrypoint could not be found (404), removing that link fixed the problem. |
I am using Vue CLI 3 with Vuetify and have the same issue. Vuetify uses stylus and all the files referred are included. Can a repo help you guys solve? |
I'm having the same issue as OP. isidrok, can you post snippets of your webpack.config.js entry points and plugins? |
Hi @DavidCondit, I was having that problem because there seems to be a conflict when using Here is my relevant configuration: const HASH = 'contenthash';
{
entry: resolve('src/index.js'),
output: {
filename: `static/js/[name]${HASH}.js`,
chunkFilename: `static/js/[name]${HASH}.js`,
path: resolve('dist'),
publicPath: '/',
},
plugins: [
new webpack.HashedModuleIdsPlugin(),
new MiniCssExtractPlugin({
filename: `static/css/[name]${HASH}.css`,
chunkFilename: `static/css/[name]${HASH}.css`,
}),
new HtmlWebpackPlugin({
template: `!prerender-loader?string!${resolve('public/index.html')}`,
minify: {
removeComments: true,
collapseWhitespace: true,
removeRedundantAttributes: true,
useShortDoctype: true,
removeEmptyAttributes: true,
removeStyleLinkTypeAttributes: false,
keepClosingSlash: true,
minifyURLs: true,
},
}),
new Critters(),
} Will try to reproduce that |
@isidrok hmm - prerender-loader probably can't generate the same hashes for CSS as the main bundle. The simple fix here would be to have |
Hi @developit, I can confirm that the issue is due to Then The reproduction is in https://github.com/isidrok/prerender-loader-reprod, the steps are in the readme. So it seems there's no real issue with Filed an issue in prerender-loader GoogleChromeLabs/prerender-loader#17 |
I'm having this issue not using prerender-loader |
@MikaAK @isidrok - it looks like Updating to the latest version fixes this in my projects, hope it does for you too. |
That did the trick! |
Using
new Critters()
without (in the usual Webpack plugins array) any options causes the compilation process to crash:^ Seems to break on
Critters.prototype.readFile = function readFile(filename, encoding) {...}
becausethis$1.fs
is undefined.Tried with:
The text was updated successfully, but these errors were encountered: