webpack.config.js配置文件出错提示:Invalid configuration object.

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/js/page" is not an absolu

te path!

   -> The output directory as **absolute path** (required).

---------------------

以上提示的意思是:输出路径必须是绝对路径

这是原配置文件中的代码:

var webpack = require("webpack");

module.exports = {

"entry": {

        index : './js/demo01.js'

    },

    //入口文件输出配置

    "output": {

        path: 'dist/js/page',//此处应该修改为 path: __dirname+'/dist/js/page'

        filename: '[name].js'

    },

"module": {

        rules: [

            {

                test: /\.scss$/,

                loader:'style-loader!css-loader!sass-loader'

            }

        ]

   }

}

---------------------

作者:田江

来源:CSDN

原文:https://blog.csdn.net/jiang7701037/article/details/80682386

版权声明:本文为博主原创文章,转载请附上博文链接!

作者:田江

来源:CSDN

原文:https://blog.csdn.net/jiang7701037/article/details/80682386

版权声明:本文为博主原创文章,转载请附上博文链接!

©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容