-
-
Notifications
You must be signed in to change notification settings - Fork 257
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The new configuration option needs to be documented in the readme.
Needs tests specific to the above configuration object.
@d3viant0ne I'm sorry for the sequence of 'commit'. I'll do it all soon. Thank´s! |
Done! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me.
Doesn't seem to handle my case module.exports = {
entry: { "js/server": [ "./folder1/script1.jsx", "./folder2/script1.jsx" ] }
...
The generated path is
when I expected it to be
I'm running Windows Option used is {
test: /\.(png|gif|woff2?|eot|ttf|svg)$/,
use: [
{
loader: "url-loader",
options: {
limit: 10000,
emitFile: true,
name: "[path][name].[ext]",
useRelativePath: true
}
}]
} |
Sorry for close, I was driving when I receive the note and I made a mess... @huan086 Remove the [path] from name and try again. |
@adriancmiranda nice catch! There's another problem, which I don't know if it should be fixed by url-loader or file-loader or ExtractTextPlugin or webpack itself My output folder is output: {
path: path.resolve(__dirname, ".") In In @font-face {
src: url('../fonts/glyphicons-halflings-regular.eot'); Folder structure
It resulted in server.css src:url(../fonts/glyphicons-halflings-regular.eot) which is invalid and Expected output
I think for the issue 46 involving CSS, it can never be fixed as long as webpack don't handle CSS separately |
@huan086 I don't know if I understand the problem(Mainly without view the webpack.config), you mean something like this? |
Wow! Close enough. In https://bitbucket.org/adriancmiranda/pr-file-loader/src/266ff6b5bd76b4f434cf21a61904f1198e36e1e5/content/bootstrap.css?at=master&fileviewer=file-view-default change to I'm thinking of using the following to fix
I'm new to webpack, no idea whether the above would work or not... Edit Only need to verify that |
Ok, let me see: If you put expected: obtained: I'll fix this also validating the webpack public path parameter, not only outputPath (As I already do). Something like About the other things i.e. PostCSS and absolute paths It solve but isn't the proposed solution. I think the file-loader is perfectly able to solving this, because he has access to all needed urls and you can still use |
@adriancmiranda - Do you have anything else needing to be updated here pre you last comment or is this good to go? |
@d3viant0ne I prefer keep it simple for now, so yes, it's good to go! |
@bebraw @michael-ciniawsky - Anything else before we we land this feature? |
@d3viant0ne Nope. It's good to go. |
@huan086 I updated the sample folder, may you test for me again, please? |
I am having the same issue, |
@Jorybraun This was already been solved, follow it here, please 😉 |
What kind of change does this PR introduce?
A feat
Did you add tests for your changes?
The old tests should work.
If relevant, did you update the README?
The old docs should work too.
Summary
Emit files with relative urls
Fixes #62 and #46
Does this PR introduce a breaking change?
no