Skip to content
New issue

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

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

Already on GitHub? # to your account

How do i copy all files (include folders) in symbolic link? #313

Closed
up9cloud opened this issue Jan 21, 2019 · 5 comments
Closed

How do i copy all files (include folders) in symbolic link? #313

up9cloud opened this issue Jan 21, 2019 · 5 comments

Comments

@up9cloud
Copy link

up9cloud commented Jan 21, 2019

Hi,

I was running something like:

// webpack.config.js
const CopyWebpackPlugin = require('copy-webpack-plugin')
module.exports = {
  entry: './src/main.js',
  output: {
    path: __dirname + '/dist',
    filename: "[name].js"
  },
  plugins: [
    new CopyWebpackPlugin([
      {
        from: __dirname + '/public',
        to: __dirname + '/dist',
        toType: 'dir'
      }
    ], {debug:'debug'})
  ]
}

My expectation is that should copy all files and folders (even if it's in soft link),

but actually i got this:

$ pwd
/tmp/a
$ tree -I node_modules
.
├── dist
│   ├── lib-copy
│   │   ├── dir
│   │   │   └── file-in-dir
│   │   └── file
│   ├── lib-ln
│   │   └── file
│   └── main.js
├── lib
│   ├── dir
│   │   └── file-in-dir
│   └── file
├── package.json
├── public
│   ├── lib-copy
│   │   ├── dir
│   │   │   └── file-in-dir
│   │   └── file
│   └── lib-ln -> ../lib
├── src
│   └── main.js
├── webpack.config.js
└── yarn.lock

Is it possible to copy all files (include folders) in symbolic link? If so, how do i do?

Thank!

the debug messages

[copy-webpack-plugin] starting emit
[copy-webpack-plugin] processing from: '/private/tmp/a/public' to: '/private/tmp/a/dist'
[copy-webpack-plugin] determined '/private/tmp/a/dist' is a 'dir'
[copy-webpack-plugin] determined '/private/tmp/a/public' to be read from '/private/tmp/a/public'
[copy-webpack-plugin] begin globbing '/private/tmp/a/public/**/*' with a context of '/private/tmp/a/public'
[copy-webpack-plugin] found /private/tmp/a/public/lib-copy/dir/file-in-dir
[copy-webpack-plugin] determined that '/private/tmp/a/public/lib-copy/dir/file-in-dir' should write to 'lib-copy/dir/file-in-dir'                                                                                                            
[copy-webpack-plugin] found /private/tmp/a/public/lib-copy/file
[copy-webpack-plugin] determined that '/private/tmp/a/public/lib-copy/file' should write to 'lib-copy/file'
[copy-webpack-plugin] found /private/tmp/a/public/lib-ln/file
[copy-webpack-plugin] determined that '/private/tmp/a/public/lib-ln/file' should write to 'lib-ln/file'
[copy-webpack-plugin] reading /private/tmp/a/public/lib-copy/dir/file-in-dir to write to assets
[copy-webpack-plugin] reading /private/tmp/a/public/lib-copy/file to write to assets                                                                                                                                                         
[copy-webpack-plugin] reading /private/tmp/a/public/lib-ln/file to write to assets
[copy-webpack-plugin] added d41d8cd98f00b204e9800998ecf8427e to written tracking for '/private/tmp/a/public/lib-copy/dir/file-in-dir'                                                                                                        
[copy-webpack-plugin] writing 'lib-copy/dir/file-in-dir' to compilation assets from '/private/tmp/a/public/lib-copy/dir/file-in-dir'
[copy-webpack-plugin] added d41d8cd98f00b204e9800998ecf8427e to written tracking for '/private/tmp/a/public/lib-copy/file'
[copy-webpack-plugin] writing 'lib-copy/file' to compilation assets from '/private/tmp/a/public/lib-copy/file'
[copy-webpack-plugin] added d41d8cd98f00b204e9800998ecf8427e to written tracking for '/private/tmp/a/public/lib-ln/file'
[copy-webpack-plugin] writing 'lib-ln/file' to compilation assets from '/private/tmp/a/public/lib-ln/file'
[copy-webpack-plugin] finishing emit
[copy-webpack-plugin] starting after-emit
[copy-webpack-plugin] adding /private/tmp/a/public to change tracking
[copy-webpack-plugin] adding /private/tmp/a/public/lib-copy/dir to change tracking
[copy-webpack-plugin] adding /private/tmp/a/public/lib-copy to change tracking
[copy-webpack-plugin] adding /private/tmp/a/public/lib-ln to change tracking
[copy-webpack-plugin] finishing after-emit
@alexander-akait
Copy link
Member

alexander-akait commented Jan 22, 2019

@up9cloud can you provide minimum reproducible test repo where plugins doesn't work?

@alexander-akait
Copy link
Member

Close in favor #158

@wowissu
Copy link

wowissu commented Mar 23, 2020

Is any update here ?
I got same problem.

@sovetski
Copy link

same here

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants