webpack file-loader
$ npm install file-loader --save-dev
webpack file-loader
$ npm install file-loader --save-dev
webpack url loader not working
// this is configured outside of the exported webpack configuration code
const BASE_DIR = resolve(`${__dirname}`);
module.exports = {
mode: 'development',
devtool: 'eval-source-map',
resolve: {
modules: [
resolve(BASE_DIR),
'node_modules'
]
},
output: {
// ...
publicPath: '/'
},
module: {
rules: [
// ...
{
test: /\.(png|svg|jpg|jpeg|gif|tiff)$/,
use: [
'file-loader?name=assets/[name].[ext]'
]
},
// ...
]
}
// ...
}
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us