Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

strange error: File not available #50

Open
oupala opened this issue Feb 18, 2019 · 1 comment
Open

strange error: File not available #50

oupala opened this issue Feb 18, 2019 · 1 comment

Comments

@oupala
Copy link

oupala commented Feb 18, 2019

I get a strange error while using metalsmith-watch:

[metalsmith-watch] ✗ Error: File not available: js/app.js

This make the whole watch task not working as the browser is never refreshed.

My js file does not exist any more because it has been minified and fingerprinter as js/app.min-.js

But I wonder why metalsmith-watch is outputting this warning as I only told him to watch for changes in markdown files:

    metalsmith
        .use(watch({
            pattern: '**/*.md',
            livereload: true
        }))
        .use(serve({
            host: '0.0.0.0',
            port: 8080,
            verbose: false
        }));
@ycardon-pro
Copy link

You must have the uglify plugin in your pipeline. You might want to disable it (along with purifyCSS) when you are in watch mode.

Something like this, using the metalsmith-if plugin

  .use(when(mode != 'dev', uglify({

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

No branches or pull requests

2 participants