为了账号安全,请及时绑定邮箱和手机立即绑定

老师报错了

$ webpack hello.js hello.bundle.js

Hash: 4383571c5f9bc3fffae5

Version: webpack 3.10.0

Time: 109ms

          Asset     Size  Chunks             Chunk Names

hello.bundle.js  2.96 kB       0  [emitted]  main

   [0] ./hello.js 210 bytes {0} [built]

   [1] ./world.js 194 bytes {0} [built] [failed] [1 error]


ERROR in ./world.js

Module parse failed: Unexpected token (8:12)

You may need an appropriate loader to handle this file type.

| */

| function world(){

|     retrurn {

|

|     };

 @ ./hello.js 7:0-21


正在回答

4 回答

知道了,原来return 写错了,多谢老师

0 回复 有任何疑惑可以回复我~

/*

* @Author: Administrator

* @Date:   2018-01-05 22:51:25

* @Last Modified by:   Administrator

* @Last Modified time: 2018-01-05 22:59:06

*/

function world(){

    retrurn {


    };

}


0 回复 有任何疑惑可以回复我~

/*

* @Author: Administrator

* @Date:   2018-01-04 12:02:00

* @Last Modified by:   Administrator

* @Last Modified time: 2018-01-06 17:08:11

*/

require('./world.js')


function hello(str){

    alert(str);

}


0 回复 有任何疑惑可以回复我~

Module parse failed: Unexpected token (8:12)

看你你的代码8行12列,是不是有多余的字符

1 回复 有任何疑惑可以回复我~

举报

0/150
提交
取消

老师报错了

我要回答 关注问题
微信客服

购课补贴
联系客服咨询优惠详情

帮助反馈 APP下载

慕课网APP
您的移动学习伙伴

公众号

扫描二维码
关注慕课网微信公众号