-
Notifications
You must be signed in to change notification settings - Fork 27
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
add support for string module ids #51
Conversation
Any unit test we could add? |
Totally, though I think it might require bumping the webpack devDep to webpack2. Does that work? |
Sure, go for it... Any suggestions how we could test for various webpack versions? One approach would be splitting the plugin development into webpack-1 and webpack-2 separate branches... |
I'll update the PR to include a webpack2 upgrade. |
Updated the diff to include tests for hashed and named module ids. While I was in there, I added linting for tests and moved the test output directory to allow running mocha with Example test output:
Example test failure when special handling of string module ids is removed:
|
SGTM too. The webpack globalize tools could commit to updating to webpack@2 (now at 2.5+) and drop webpack@1 altogether. It would simplify development and help move consumers of these packages onto the latest tools |
Signed-off-by: James Bellenger <jbellenger@twitter.com>
Thank you!! |
Released |
ProductionModePlugin writes module ids as unescaped values. This works for the most common case of integer module ids, but not for strings. Trying to use ProductionModePlugin with something like NamedModulesPlugin, renders the snippet below which throws a syntax error at runtime:
This PR adds support for quoting module ids that look like strings.