美文网首页
webpack.config.js配置文件出错提示:Invali

webpack.config.js配置文件出错提示:Invali

作者: thekings | 来源:发表于2018-11-29 15:11 被阅读0次

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

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

相关文章

网友评论

      本文标题:webpack.config.js配置文件出错提示:Invali

      本文链接:https://www.haomeiwen.com/subject/nvlfcqtx.html