240 发简信
IP属地:河南
  • 使用楼主的方式配置,npm start启动正常,通过http://localhost:3000/index.htmlhttp://localhost:3000/admin.html能访问对应的文件,但是npm run build报错。(我想说的是通过配置,npm start是有效果的,但是npm run build报错)。报错信息如下:Creating an optimized production build...
    Failed to compile.

    Invalid configuration object. Webpack has been initialised using a configuration object that does not match the API schema.
    - configuration.entry should be one of these:
    function | object { <key>: non-empty string | [non-empty string] } | non-empty string | [non-empty string]
    -> The entry point(s) of the compilation.
    Details:
    * configuration.entry should be an instance of function
    -> A Function returning an entry object, an entry string, an entry array or a promise to these things.
    * configuration.entry['index'] should be a string.
    -> The string is resolved to a module which is loaded upon startup.
    * configuration.entry['index'][0] should be a string.
    -> A non-empty string
    * configuration.entry['mobile'] should be a string.
    -> The string is resolved to a module which is loaded upon startup.
    * configuration.entry['mobile'][0] should be a string.
    -> A non-empty string
    * configuration.entry should be a string.
    -> An entry point without name. The string is resolved to a module which is loaded upon startup.
    * configuration.entry should be an array:
    [non-empty string]

    从create-react-app学习webpack(四) 如何优雅的配置多入口访问

    在大多数情况底下,我们只需要一个单页应用便可以顺利的完成许多应用场景.但是还是免不了有很多情况下我们需要通过多页才能够顺利的完成任务. 本篇文章就为大家讲述如何快速优雅的 生...

  • 新手提问:哪里用到了thunk,如何使用thunk?

    使用Redux-thunk发Async Action的例子

    先贴官网链接:https://github.com/gaearon/redux-thunk 简单的逻辑:首先,这是个关于action creator的解释。什么是action...

  • 三:步骤二代码问题:
    1.:name="index"
    name变量没有用到
    2.addNew.$emit('remove', index);
    addNew.$on('remove', function(index) {
    this.todoItems.splice(index, 1);
    });
    上面代码无用,起到删除作用的是this.currentItems.splice(index, 1);
    3.todoItems: []
    该数组在整个代码中没有用

    从零学习vue之简单演练一Todolist Demo

    断断续续花了十来天时间把vue官网的基础篇看完了,打算做一个todolist Demo。先有个基本的框架,从易到难,功能从瘦到胖吧。 步骤一 定位功能:新增模块和展示模块。为...

  • 一:楼主的代码能运行
    二:步骤一代码问题
    1.<button @click="addNewItem(newItem)">新增</button>
    addNewItem(newItem)参数不需要
    2.this.todoItems.push(this.newItem)
    该行代码不需要
    3.showItems.$emit('addNew', this.newItem); //shoItems的监听
    这里不是监听事件,是触发事件
    4.showItems组件下的method方法不需要
    5.li为无序列表,图片为有序列表

    从零学习vue之简单演练一Todolist Demo

    断断续续花了十来天时间把vue官网的基础篇看完了,打算做一个todolist Demo。先有个基本的框架,从易到难,功能从瘦到胖吧。 步骤一 定位功能:新增模块和展示模块。为...