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

Allow slash in filename regex #62

Merged
merged 1 commit into from Feb 2, 2016
Merged

Allow slash in filename regex #62

merged 1 commit into from Feb 2, 2016

Conversation

koteus
Copy link
Contributor

@koteus koteus commented Feb 1, 2016

I started the webpack-dev-server in lazy mode with the following arguments --lazy --iframe --progress --colors. My webpack.config.js looks like this:

'use strict';

var path = require('path');

module.exports = {
    entry: [
        './app/index'
    ],
    output: {
        path: path.join(__dirname, 'build'),
        filename: 'bundle.js',
        publicPath: '/static/'
    }
};

I got 404 error for bundle.js. After some debugging it turned out that this expression (!options.filename || options.filename.test(filename)) on line 150 evaluates to false because filename variable equals to "/bundle.js" (with a forward slash). So I changed options.filename regex to allow optional forward slash and everything works now correctly.

@koteus
Copy link
Contributor Author

koteus commented Feb 1, 2016

sokra added a commit that referenced this pull request Feb 2, 2016
Allow slash in filename regex
@sokra sokra merged commit 4525806 into webpack:master Feb 2, 2016
@sokra
Copy link
Member

sokra commented Feb 2, 2016

Thanks

@mathieumg
Copy link

I imagine this is only for Webpack 2.x?

@SpaceK33z
Copy link
Member

Nope, it was released in stable a while ago.

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 this pull request may close these issues.

None yet

4 participants