You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There seems to be an issue when running webpack on the configuration created by webpack-cli. Apparently, webpack-cli does not create an absolute path for dist where webpack expects it.
What is the current behavior?
$ webpack-cli
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? index.js
? Which folder will your generated bundles be in? [default: dist]:
? Are you going to use this in production? No
? Will you be using ES2015? Yes
? 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']:
[email protected] /Users/svenvandescheur/Desktop/test
├── [email protected]
├── [email protected]
└── [email protected]
npm WARN [email protected] No description
npm WARN [email protected] No repository field.
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!
$ webpack -v
2.5.1
$ webpack-cli -v
1.3.1
$ node -v
v6.2.2
os X 10.11.6
$ cat webpack.config.js
const webpack = require('webpack');
/*
* We've enabled UglifyJSPlugin for you! This minifies your app
* in order to load faster and run less javascript.
*
* https://github.com/webpack-contrib/uglifyjs-webpack-plugin
*
*/
const UglifyJSPlugin = require('uglifyjs-webpack-plugin');
module.exports = {
entry: 'index.js',
output: {
filename: '[name].bundle.js',
path: './dist'
},
module: {
rules: [
{
test: /\.js$/,
exclude: /node_modules/,
loader: 'babel-loader',
options: {
presets: ['es2015']
}
}
]
},
plugins: [new UglifyJSPlugin()]
};
The text was updated successfully, but these errors were encountered:
There seems to be an issue when running webpack on the configuration created by webpack-cli. Apparently, webpack-cli does not create an absolute path for dist where webpack expects it.
What is the current behavior?
$ webpack-cli
$ webpack
$ webpack -v
$ webpack-cli -v
$ node -v
$ cat webpack.config.js
The text was updated successfully, but these errors were encountered: