Skip to content
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

Option to map entries or normalize paths on both Windows and OSX/Linux #60

Closed
mikegleasonjr opened this issue Jul 12, 2017 · 10 comments · Fixed by #78
Closed

Option to map entries or normalize paths on both Windows and OSX/Linux #60

mikegleasonjr opened this issue Jul 12, 2017 · 10 comments · Fixed by #78
Milestone

Comments

@mikegleasonjr
Copy link

Hi,

The keys of the manifest on Windows are: "path\\file.ext"

Whereas on Linux/OSX it is: "path/file.ext"

Making it difficult to reference a resource by its key in the manifest.

Can we have a callback function to transform the manifest elements prior to insertion or have both paths use slashes (/)?

@mastilver
Copy link
Contributor

Can we have a callback function to transform the manifest elements prior to insertion or have both paths use slashes (/)?

This is what I'm planning to do on #55

@weaverryan
Copy link
Contributor

+1 - this is the 1 other hack that we're maintaining in our fork. I really like #55 ;)

@a-x-
Copy link
Contributor

a-x- commented Jul 13, 2017

I have two points:

  • as I understand, it should be default behavior
  • how to solve different platforms problem: when the building goes no the, say, Windows, and running on the Linux?

@mastilver
Copy link
Contributor

@a-x- you are making a good point here

We should stick to the linux path even on windows so it's consistent if you relly on the key during your build process

@weaverryan
Copy link
Contributor

Yep, our hack is exactly to make sure that the keys are always the same, regardless of platform. +1 for it being the default behavior.

@mastilver mastilver added the bug label Jul 14, 2017
@mastilver mastilver added this to the v2.x milestone Jul 14, 2017
@mastilver
Copy link
Contributor

@mikegleasonjr @weaverryan Would you mind giving me an example of webpack.config.js where this issue occurs, that will help me writing the tests (as I don't have access to a windows machine...)

@mastilver
Copy link
Contributor

ping @mikegleasonjr @weaverryan

@mikegleasonjr
Copy link
Author

@mastilver
Copy link
Contributor

@mikegleasonjr Good point ;)

{
  context: __dirname,
  entry: {
    'test\\one': './fixtures/file.js',
    two: './fixtures/file-two.js'
  },
  plugins: [
    new ManifestPlugin()
  ]
}

@mikegleasonjr
Copy link
Author

Thanks @mastilver !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants