Copy-webpack-plugin: copy folders in Windows

Created on 26 Oct 2016  路  3Comments  路  Source: webpack-contrib/copy-webpack-plugin

I am using Windows 7,
I have folder with subfolder which i want copy

problem is with subfolder and dev-server: this plugin return assets with backslash and dev-server don't find this files

example:
assets\lang\en.json from plugins
assets/lang/en.json from browser request

Bug

Most helpful comment

@larsthorup Saw your PR; I'll get that in soon. This is definitely a gap in our test coverage. I think I can add tests around this without spinning up a cross-platform CI.

All 3 comments

I have the same problem (win10, node@7, [email protected]).

Running the tests with npm run build && npm run build:tests && mocha compiled_tests/ gives 30 failing tests, all involving mismatched slashes and backslashes, like e.g.

1) apply function with glob in from can use a glob to move multiple files to the root directory:

  AssertionError: expected { Object (binextension.bin, file.txt, ...) } to have keys 'binextension.bin', 'file.txt', 'directory/directoryfile.txt', 'directory/nested/nestedfile.txt', and 'noextension'
  + expected - actual

   [
     "binextension.bin"
  -  "directory\\directoryfile.txt"
  -  "directory\\nested\\nestedfile.txt"
  +  "directory/directoryfile.txt"
  +  "directory/nested/nestedfile.txt"
     "file.txt"
     "noextension"
   ]

  at C:\r\github\copy-webpack-plugin\compiled_tests\index.js:117:67

I can work around the issue for now by downgrading to [email protected].

I will see if I can figure out a fix for this...

@larsthorup Saw your PR; I'll get that in soon. This is definitely a gap in our test coverage. I think I can add tests around this without spinning up a cross-platform CI.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

nickenchev picture nickenchev  路  3Comments

smashercosmo picture smashercosmo  路  6Comments

jbruni picture jbruni  路  3Comments

serut picture serut  路  3Comments

richmeij picture richmeij  路  5Comments