Created
September 2, 2021 02:43
-
-
Save karlvr/90759ad647661e9bbd3d58f7998eb14b to your computer and use it in GitHub Desktop.
Webpack asset naming ENAMETOOLONG bug
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
body { | |
background-image: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNyIgdmlld0JveD0iMCAwIDE2IDE3Ij4KICA8cGF0aCBmaWxsPSIjRkZGRkZGIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0xNiw4IEwxNiw0LjAwNjg0NTQ3IEMxNiwzLjQ0OTk0ODc2IDE1LjU1MTg5NDUsMyAxNC45OTkxMjgzLDMgTDEzLDMgTDEzLDUuMDAwMTkyNTEgQzEzLDUuNTUyMzcwOTQgMTIuNTU2MTM1Miw2IDEyLDYgQzExLjQ0NzcxNTMsNiAxMSw1LjU1NjI4MzM1IDExLDUuMDAwMTkyNTEgTDExLDMgTDUsMyBMNSw1LjAwMDE5MjUxIEM1LDUuNTUyMzcwOTQgNC41NTYxMzUxOCw2IDQsNiBDMy40NDc3MTUyNSw2IDMsNS41NTYyODMzNSAzLDUuMDAwMTkyNTEgTDMsMyBMMS4wMDA4NzE2NiwzIEMwLjQ0NDYzMDg2MSwzIDAsMy40NTA3ODAwNyAwLDQuMDA2ODQ1NDcgTDAsOCBMMTYsOCBaIE0xNiw5IEwxNiwxNS45OTMxNTQ1IEMxNiwxNi41NDkyMTk5IDE1LjU1NTM2OTEsMTcgMTQuOTk5MTI4MywxNyBMMS4wMDA4NzE2NiwxNyBDMC40NDgxMDU1MDUsMTcgMCwxNi41NTAwNTEyIDAsMTUuOTkzMTU0NSBMMCw5IEwxNiw5IFogTTQsMiBDMy40NDc3MTUyNSwyIDMsMS41NTIyODQ3NSAzLDEgQzMsMC40NDc3MTUyNSAzLjQ0NzcxNTI1LDAgNCwwIEM0LjU1MjI4NDc1LDAgNSwwLjQ0NzcxNTI1IDUsMSBDNSwxLjU1MjI4NDc1IDQuNTUyMjg0NzUsMiA0LDIgWiBNMTIsMiBDMTEuNDQ3NzE1MywyIDExLDEuNTUyMjg0NzUgMTEsMSBDMTEsMC40NDc3MTUyNSAxMS40NDc3MTUzLDAgMTIsMCBDMTIuNTUyMjg0NywwIDEzLDAuNDQ3NzE1MjUgMTMsMSBDMTMsMS41NTIyODQ3NSAxMi41NTIyODQ3LDIgMTIsMiBaIi8+Cjwvc3ZnPgo='); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "css-loader-example", | |
"version": "1.0.0", | |
"description": "", | |
"main": "index.js", | |
"dependencies": { | |
"css-loader": "^6.2.0", | |
"webpack": "^5.51.1", | |
"webpack-cli": "^4.8.0" | |
}, | |
"author": "", | |
"license": "ISC" | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* eslint-env node */ | |
module.exports = { | |
mode: 'production', | |
entry: { | |
'test': './src/main.css', | |
}, | |
output: { | |
assetModuleFilename: '[name].[contenthash:8][ext]', | |
}, | |
module: { | |
rules: [ | |
{ | |
oneOf: [ | |
{ | |
test: /\.css$/, | |
use: [ 'css-loader' ], | |
}, | |
{ | |
exclude: /node_modules/, | |
type: 'asset/resource', | |
}, | |
], | |
}, | |
], | |
}, | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment