Skip to content

How to remove /views/ from path? #525

Closed Answered by ultimateshadsform
ultimateshadsform asked this question in Q&A
Discussion options

You must be logged in to vote

Here is final version I did:

path: (file) => {
              // Keep entrypoint and strip out /views/
              const entrypoint = file.split('/entrypoints/')[1].split('/')[0];
              const viewPath = file.slice(
                file.lastIndexOf('/views/') + '/views/'.length
              );
              return `${entrypoint}/${viewPath}`;
            },

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by posva
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant
Converted from issue

This discussion was converted from issue #524 on October 20, 2024 00:10.