Invalid configuration object -configuration.output.path after installing sass

ぐ巨炮叔叔 提交于 2020-03-05 03:53:58

问题


I facing an issue while running webpack using the command npm run dev, after installing npm sass

"node-sass": "^4.5.2",
"sass-loader": "^6.0.3",
"style-loader": "^0.16.1",

Issue:

Invalid configuration object -configuration.output.path.

given my package.json and webpack.config.js.

Thanks in advance could somebody let me know what we went wrong, how could we resolve this issue.

Issue:

webpack.config.js

var HtmlWebpackPlugin = require('html-webpack-plugin');

module.exports = {
    entry: './src/app.js',
    output: {
        path : '    dist',
        filename : 'app.bundle.js'  
    },
    module: {
        rules: [
            { test: /\.scss$/, use: ['style-loader','css-loader', 'sass-loader'] }
        ]
    },
    plugins: [
            new HtmlWebpackPlugin({
                title: 'Index Project Template',
                minify: {
                    collapseWhitespace: true
                },
                hash: true,
                template: './src/indextemp.ejs', // Load a custom template (ejs by default see the FAQ for details) 
            })  
    ]
}

package.json

{
  "name": "webpacks",
  "version": "1.0.0",
  "description": "Webpack Start",
  "main": "index.js",
  "scripts": {
    "dev": "webpack -d --watch",
    "prod": "webpack -p"
  },
  "author": "",
  "license": "ISC",
  "devDependencies": {
    "css-loader": "^0.28.0",
    "html-webpack-plugin": "^2.28.0",
    "node-sass": "^4.5.2",
    "sass-loader": "^6.0.3",
    "style-loader": "^0.16.1",
    "webpack": "^2.4.1"
  }
}

来源:https://stackoverflow.com/questions/43742252/invalid-configuration-object-configuration-output-path-after-installing-sass

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!