Skip to content

ensure default output path is absolute#125

Merged
evenstensberg merged 1 commit into
webpack:masterfrom
rossipedia:rossipedia-abs-output-path
May 12, 2017
Merged

ensure default output path is absolute#125
evenstensberg merged 1 commit into
webpack:masterfrom
rossipedia:rossipedia-abs-output-path

Conversation

@rossipedia

Copy link
Copy Markdown
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

jsf-clabot commented May 8, 2017

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@evenstensberg evenstensberg left a comment

Copy link
Copy Markdown
Member

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
Copy Markdown
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