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

outputPath validation fails on Windows #139

Open
mdurling opened this issue Oct 18, 2016 · 7 comments
Open

outputPath validation fails on Windows #139

mdurling opened this issue Oct 18, 2016 · 7 comments

Comments

@mdurling
Copy link

[email protected]
[email protected]

The path check should be using the platform specific delimiter, e.g. require('path').sep

{
"metadata": {
"port": 9000,
"host": "localhost",
"ENV": "development",
"HMR": false
},
"entry": {
"app": [],
"aurelia-bootstrap": [
"aurelia-bootstrapper-webpack",
"aurelia-polyfills",
"aurelia-pal",
"aurelia-pal-browser",
"regenerator-runtime",
"bluebird"
],
"aurelia": [
"aurelia-binding",
"aurelia-dependency-injection",
"aurelia-event-aggregator",
"aurelia-framework",
"aurelia-history",
"aurelia-history-browser",
"aurelia-loader",
"aurelia-loader-webpack",
"aurelia-logging",
"aurelia-logging-console",
"aurelia-metadata",
"aurelia-path",
"aurelia-route-recognizer",
"aurelia-router",
"aurelia-task-queue",
"aurelia-templating",
"aurelia-templating-binding",
"aurelia-templating-router",
"aurelia-templating-resources"
]
},
"output": {
"path": "C:\Git\proximus\dist",
"filename": "[name].bundle.js",
"sourceMapFilename": "[name].bundle.map",
"chunkFilename": "[id].chunk.js"
},
"externals": {
"jquery": "jQuery"
},
"devServer": {
"stats": {
"colors": true,
"hash": false,
"version": true,
"timings": false,
"assets": true,
"chunks": false,
"modules": false,
"reasons": false,
"children": false,
"source": false,
"errors": true,
"errorDetails": true,
"warnings": true,
"publicPath": false
},
"port": 9000,
"host": "localhost",
"historyApiFallback": true,
"watchOptions": {
"aggregateTimeout": 300,
"poll": 1000
},
"outputPath" [1]: "C:\Git\proximus\dist"
},
"debug": true,
"devtool": "cheap-module-inline-source-map",
"plugins": [
{
"definitions": {
"DEV": true,
"ENV": ""development"",
"HMR": false,
"process.env": {
"ENV": ""development"",
"NODE_ENV": ""development"",
"HMR": false,
"WEBPACK_HOST": ""localhost"",
"WEBPACK_PORT": "9000"
}
}
}
]
}

[1] "outputPath" should end with a slash (example: "/assets/" or "http://cdn.example.com/assets/[hash]/")

@kentcdodds
Copy link
Collaborator

I'm guessing the changes need to happen here: https://github.com/js-dxtools/webpack-validator/blob/master/src/types/absolutePath.js

Would you be willing to makeapullrequest.com?

@nyrosmith
Copy link
Collaborator

@kentcdodds This won't be an easy change bc the regex itself is not correct at all. I tried to change current query if it REALLY is an absolute path but afterwards lots of Test configs failed.
Related issue: #131

If we change the current behavior we'd break lots of builds... But on the other side the validation is not correct right now.

@kentcdodds
Copy link
Collaborator

Sounds like we'd need a breaking change. Is there any reason we couldn't just use an existing npm package that does this check for us?

@nyrosmith
Copy link
Collaborator

No, but we'd have to change the Test configs to pass or just verify Test configs for the current platform.
I am not sure if it is worth it because webpack2 has its own scheme validation.

@kentcdodds
Copy link
Collaborator

I am not sure if it is worth it because webpack2 has its own scheme validation.

Agreed. But this seems pretty significant for windows users. I'd be happy to accept a pull request that fixes it for that case. But I definitely don't have time to work on it myself.

@mdurling
Copy link
Author

I think the change would be needed here https://github.com/js-dxtools/webpack-validator/blob/c9eea8d4142a329c09f0fd49ec0d411c4fe6ad4c/src/types/urlPart.js

However, I was using this package as a way to check configs that are failing the webpack2 validation which seems to be even more restrictive so yes, this package may become somewhat redundant for folks using webpack2.

@kentcdodds
Copy link
Collaborator

Sounds good. Anyone can feel free to make a PR to fix this issue. 👍

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

No branches or pull requests

3 participants