This repository has been archived by the owner on Mar 17, 2021. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 158
webpack stats.json
original filename?
#11
Comments
|
Let's say I have this:
In my To achieve something like that:
Or am I thinking in the wrong way? |
in {
id: 11,
identifier: "...\\node_modules\\file-loader\\index.js!...\\test\\browsertest\\img\\image.png",
name: "(webpack)/~/file-loader!./img/image.png",
size: 81,
cacheable: true,
built: true,
optional: false,
prefetched: false,
chunks: [0],
assets: ["c31e9820c001c9c4a86bce33ce43b679.png"],
issuer: "...\\test\\browsertest\\lib\\index.web.js",
profile: {
factory: 245,
building: 121
},
failed: false,
errors: 0,
warnings: 0,
reasons: [
{
moduleId: 0,
moduleIdentifier: "...\\test\\browsertest\\lib\\index.web.js",
module: "./lib/index.web.js",
moduleName: "./lib/index.web.js",
type: "cjs require",
userRequest: "!file!../img/image.png",
loc: "105: 3-36"
}
],
source: 'module.exports = __webpack_public_path__ + "c31e9820c001c9c4a86bce33ce43b679.png"'
}
|
Thanks found it 👍 |
FYI This module enables the thing you tried to implement (requiring images on server for example) |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Hey,
For my server side rendering, I would need to map the original filename/path to the generated one. To make
require(xxxx.png)
works in node.Is there a way to achieve this easily?
The text was updated successfully, but these errors were encountered: