question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add ability to ignore files

See original GitHub issue

I’d like to colocate .css and .test.tsx files with my files in my routes. So I’d like to be able to ignore files as routes. Something like this config?

module.exports = {
	ignoredRouteFiles: ['**/*'],
	routes: async defineRoutes => {
		return flatRoutes('routes', defineRoutes, {
			ignoredRouteFiles: ['**/.*', '**/*.css', '**/*.test.{js,jsx,ts,tsx}'],
		})
	},
}

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
kilimancommented, Sep 14, 2022

Also, I just saw a reference to routeIgnorePatterns in the docs. What is that?

Ah, I just copy+pasted from Ryan’s gist. I believe he meant ignoredRouteFiles. And his commentary was mainly saying how it was difficult to tell which were route files and which weren’t without referring to the config. With flat-folders, you know that anything other than index (or the various aliases like _route, _layout etc.) were supporting files.

I’m almost finished with the update. Just writing my tests.

0reactions
kentcdoddscommented, Sep 14, 2022

Thank you very much!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Add ability to ignore files · Issue #50 · nektos/act - GitHub
This works fine in Actions in production because the dependencies aren't checked into the repository. However, I can't see a way of not...
Read more >
.gitignore File – How to Ignore Files and Folders in Git
Inside .gitignore , you can tell Git to ignore only a single file or a single folder by mentioning the name or pattern...
Read more >
How to ignore certain files in Git - Stack Overflow
The problem is that .gitignore ignores just files that weren't tracked before (by git add ). Run git reset name_of_file to unstage the...
Read more >
Ignoring Files in Git - Medium
Git has the ability to ignore any files, file patterns, or file extensions that you add to a .gitignore file.
Read more >
Find and Replace in Path - add ability to exclude files - YouTrack
It would save me a lot of work to be able to exclude certain files. Make the current label "Include File mask(s)" and...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found