-
Notifications
You must be signed in to change notification settings - Fork 0
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
file-loader
and url-loader
are deprecated
#488
Comments
Current usage of ...
{
test: /\.(png|jpe?g|gif|svg|ico|icns)$/i,
use: [{
loader: 'file-loader',
options: {
// Electron-Forge requires these options for packaging static assets with correct paths, solution found here:
// https://github.com/electron-userland/electron-forge/issues/1196
name: '[path][name].[ext]',
publicPath: '..', // move up from 'main_window'
context: 'src' // set relative working folder to src
}
}]
} |
#500 switches the webpack.rules.js configuration to use asset modules, but does not remove the |
ajaxorg/ace#4744 includes a suggestion to switch from: ace.config.setModuleUrl('ace/mode/javascript_worker', require('file-loader?esModule=false!./src-noconflict/worker-javascript.js')) to: ace.config.setModuleUrl('ace/mode/javascript_worker', new URL('ace-builds/src-noconflict/worker-javascript.js', import.meta.url)) However, this format switch would only be useful in |
We can resolve this issue once ajaxorg/ace-builds#221 is merged and pulled into securingsincity/react-ace, after which we will no longer have any dependencies on |
Due to the inclusion of ESM loaders via ajaxorg/ace#5070, this issue is also likely dependent on #659. Additionally, we should investigate whether the samples provided in https://github.com/mkslanc/ace-samples are helpful for updating our Webpack config files to be compatible with ESM loading through |
file-loader
and url-loader
are deprecated
Describe the bug
file-loader
andurl-loader
are deprecated; per notes in Webpack v6 Asset Modules documentation. Therefore, to mitigate any future issues we need to switch over to Asset Modules within Synectic.This issue has appeared because using
css-loader
in conjunction with Webpack v6 results innew URL(...)
syntax being generated which requires the use of Asset Modules for handlingtype: 'asset'
on all calls tourl()
. Otherwise, errors are thrown on compilation. Additionally, warnings have begun to appear whenever related packages are updated viayarn
.Parts that need to be addressed:
url-loader
dependencyfile-loader
dependencyRelevant issues/PR being tracked for resolution:
Versions (please complete the following information):
Additional context
Found in #479.
The text was updated successfully, but these errors were encountered: