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

ensure default output path is absolute #125

Merged
merged 1 commit into from
May 12, 2017
Merged

ensure default output path is absolute #125

merged 1 commit into from
May 12, 2017

Conversation

rossipedia
Copy link
Contributor

Example of problem:

$ webpack-cli init

Insecure about some of the questions?

https://github.com/webpack/webpack-cli/blob/master/INIT.md

? Will you be creating multiple bundles? No
? Which module will be the first to enter the application? ./src
? Which folder will your generated bundles be in? [default: dist]:
? Are you going to use this in production? No
? Will you be using ES2015? No
? Will you use one of the below CSS solutions? No
? If you want to bundle your CSS files, what will you name the bundle? (press enter to skip)
? Name your 'webpack.[name].js?' [default: 'config']:

... (npm output) ...

Congratulations! Your new webpack configuration file has been created!

$ webpack
Invalid configuration object. Webpack has been initialised using a configuration object that does not match the API schema.
 - configuration.output.path: The provided value "./dist" is not an absolute path!

$ cat -n webpack.config.js
...
    15          output: {
    16                  filename: '[name].bundle.js',
    17                  path: './dist'   <-- RUH-ROH
    18          },
...

This PR converts the line above to:

path: path.resolve(__dirname, 'dist')

@jsf-clabot
Copy link

jsf-clabot commented May 8, 2017

CLA assistant check
All committers have signed the CLA.

Copy link
Member

@evenstensberg evenstensberg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thanks! 😻

@evenstensberg evenstensberg requested a review from okonet May 9, 2017 08:12
@evenstensberg
Copy link
Member

Signing @okonet for second review, this is okay for me.
skjermbilde 2017-05-09 kl 10 13 21
skjermbilde 2017-05-09 kl 10 13 17

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

Successfully merging this pull request may close these issues.

3 participants