老師報錯了
$ 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
2018-01-06
知道了,原來return 寫錯了,多謝老師
2018-01-06
/*
* @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 {
? ? };
}
2018-01-06
/*
* @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);
}
2018-01-06
Module parse failed: Unexpected token (8:12)
看你你的代碼8行12列,是不是有多余的字符