Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

[Bug]: copy-webpack-plugin stuck in compilation.fileSystemInfo.createSnapshot #6836

Closed
mochiya98 opened this issue Jun 17, 2024 · 3 comments · Fixed by #6866
Closed

[Bug]: copy-webpack-plugin stuck in compilation.fileSystemInfo.createSnapshot #6836

mochiya98 opened this issue Jun 17, 2024 · 3 comments · Fixed by #6866
Labels
bug Something isn't working pending triage The issue/PR is currently untouched.

Comments

@mochiya98
Copy link

mochiya98 commented Jun 17, 2024

System Info

  System:
    OS: macOS 14.4.1
    CPU: (10) arm64 Apple M1 Pro
    Memory: 157.83 MB / 32.00 GB
    Shell: 3.2.57 - /bin/bash
  Binaries:
    Node: 20.8.0 - ~/.anyenv/envs/nodenv/versions/20.8.0/bin/node
    Yarn: 4.2.2 - ~/.anyenv/envs/nodenv/versions/20.8.0/bin/yarn
    npm: 10.1.0 - ~/.anyenv/envs/nodenv/versions/20.8.0/bin/npm
    pnpm: 9.1.4 - /opt/homebrew/bin/pnpm
  Browsers:
    Chrome: 125.0.6422.176
    Safari: 17.4.1
  npmPackages:
    @rspack/cli: 0.7.1 => 0.7.1 
    @rspack/core: 0.7.1 => 0.7.1 
    @rspack/dev-server: ^0.7.1 => 0.7.1 

Details

I want to use copy-webpack-plugin to use the function to option.
but currently, when using copy-webpack-plugin with rspack, it gets stuck in this line:

https://github.com/webpack-contrib/copy-webpack-plugin/blob/8037ae35911af93c9671b61019436f0613312259/src/index.js#L196-L216

and the cause of this is obvious, due to the fact that compilation.fileSystemInfo.createSnapshot(...) has not been implemented:

createSnapshot() {
// fake implement to support html-webpack-plugin
return null;
}

What is expected?

copy-webpack-plugin works OR rspack.CopyRspackPlugin supports function to option

Reproduce link

No response

Reproduce Steps

  1. use copy-webpack-plugin and run compilation
const CopyPlugin = require("copy-webpack-plugin");
// ...
plugins: [
  // I would like to use the function to option,
  // but it is not directly related to reproducing the problem
  new CopyPlugin({patterns: [ { from: "public", to: "dist" } ] }),
]
@mochiya98 mochiya98 added bug Something isn't working pending triage The issue/PR is currently untouched. labels Jun 17, 2024
@LingyuCoder
Copy link
Collaborator

cc @9aoy

@9aoy
Copy link
Collaborator

9aoy commented Jun 18, 2024

Get it. Let me see if this api is necessary or we can support function to option in CopyRspackPlugin at low cost.

@LingyuCoder
Copy link
Collaborator

Get it. Let me see if this api is necessary or we can support function to option in CopyRspackPlugin at low cost.

Support function to option is a better way, the compilation.fileSystemInfo.createSnapshot is related to persistent cache which rspack will not follow webpack

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working pending triage The issue/PR is currently untouched.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants