Advertisement
Guest User

Untitled

a guest
Apr 24th, 2019
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.42 KB | None | 0 0
  1. const CopyWebpackPlugin = require('copy-webpack-plugin');
  2.  
  3. function copy(path) {
  4. return {
  5. from: path,
  6. to: path,
  7. };
  8. }
  9.  
  10. function multipleCopy(...paths) {
  11. return paths.map(copy);
  12. }
  13.  
  14. const config = {
  15. plugins: [
  16. new CopyWebpackPlugin(
  17. multipleCopy('_locales', 'manifest.json')
  18. .concat([
  19. {from: '**/*.html'},
  20. {from: '**/*.css'},
  21. {from: '**/*.png'},
  22. ])
  23. ),
  24. ],
  25. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement