Open jljorgenson18 opened 3 years ago
Great to hear that you now have all of your tests passing.
Please note that some webpack compilation settings are ignored by Wallaby where they do not make sense in a Wallaby context. Some examples include: Code Splitting
, Entry Points
, and Output
. Due to differences in the Wallaby runtime, you may also need to adjust configuration that writes to the file system (such as CopyWebpackPlugin
and Asset Modules
) as you have done so that Wallaby can find the files when it runs your tests.
At this stage we do not have any plans (or a technically reasonable way) to support file-loader
asset modules outside of changing your configuration or making them available by modifying your Wallaby.js configuration (e.g. with a files
pattern).
Issue description or question
Webpack v5 introduced some new ways of handling assets (https://webpack.js.org/guides/asset-modules/). One of the ways behaves a lot like file-loader and copies a file from a source directory into the dist directory,
type: 'asset/resource'
. That seems to not be working in Wallaby and if you try to fetch the loaded url, the file is not there.I was able to get around this by setting the assetModuleFilename to match where the file is in the source code
but it's not ideal.
Note: This also seems to be a problem when using copy-webpack-plugin as well.