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

还是要装webpack-cli吗

视频中并没有安装webpack-cli,老师也说不要自己配么?为什么我还报错,一定要让我装webpack-cli呢

One CLI for webpack must be installed. These are recommended choices, delivered as separate packages:

 - webpack-cli (https://github.com/webpack/webpack-cli)

   The original webpack full-featured CLI.

 - webpack-command (https://github.com/webpack-contrib/webpack-command)

   A lightweight, opinionated webpack CLI.

We will use "npm" to install the CLI via "npm install -D".

Which one do you like to install (webpack-cli/webpack-command):


正在回答

2 回答

webpack 4 需要安装webpack-cli

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

慕莱坞02534 提问者

非常感谢!
2018-08-09 回复 有任何疑惑可以回复我~

安装后还报错。

WARNING in configuration

The 'mode' option has not been set, webpack will fallback to 'production' for this value. Set 'mode' option to 'development' or 'production' to enable defaults for each environment.

You can also set it to 'none' to disable any default behavior. Learn more: https://webpack.js.org/concepts/mode/


ERROR in ./src/app.vue 1:0

Module parse failed: Unexpected token (1:0)

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

> <template>

|     <div id="text">{{text}}</div>

| </template>

 @ ./src/index.js 2:0-27 8:19-22


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

举报

0/150
提交
取消

还是要装webpack-cli吗

我要回答 关注问题
意见反馈 帮助中心 APP下载
官方微信