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.

Custom ignore pattern for public folder copy

See original GitHub issue

What problem does this feature solve?

I have assets that are used exlusively for the development and currently I am deleting those after build, but that approach is not ideal. Among others because cli analytics is taking those into account and providing missleading information.

What does the proposed API look like?

// vue.config.js
module.exports = {
  publicIgnore: [] // glob pattern
]

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:2
  • Comments:12 (2 by maintainers)

github_iconTop GitHub Comments

7reactions
LinusBorgcommented, Apr 24, 2020

I don’t think that we should add yet another config option for this use case, it doesn’t seem common to me, but I may be mistaken. Can you elaborate on your use case a bit?

In any case, you can tweak the webpack config for this:

chainwebpack: config => {
  config.plugin('copy').tap(([options])=> {
    options[0].ignore.push('some/glob')
    return [options]
  })
}

https://github.com/webpack-contrib/copy-webpack-plugin#ignore

4reactions
miljan-aleksiccommented, Aug 16, 2018

Probably you omited the destructuring. This is my code:

config.plugin('copy').tap(([options]) => {
  options[0].ignore.push('somefolder/**/*')
  return [options]
})
Read more comments on GitHub >

github_iconTop Results From Across the Web

CopyWebpackPlugin - ignore a folder - Stack Overflow
It copies everything. What I have done in the webpack.config.js: new CopyWebpackPlugin([ { from: 'src/assets', to: ' ...
Read more >
.gitignore file - ignoring files in Git | Atlassian Git Tutorial
Git ignore patterns are used to exclude certain files in your working directory from your Git history. They can be local, global, or...
Read more >
The Ultimate Guide to Copying Files and Folders Using Xcopy
To copy all files and directories while ignoring empty directories, append the /S option to the end of the Xcopy command, as shown...
Read more >
How can I copy all files while excluding files with a certain ...
I would want to copy all the files photo-a.json , photo-b.json and others into another folder called photos-copy . Basically, I want to...
Read more >
Working With Files - Gradle User Manual
Copying a single file; Copying multiple files; Copying directory hierarchies ... single source of truth, such as a task or shared project property....
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