Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

webpack 打包报错 #8

Open
jacobzheng opened this issue Nov 7, 2016 · 9 comments
Open

webpack 打包报错 #8

jacobzheng opened this issue Nov 7, 2016 · 9 comments

Comments

@jacobzheng
Copy link

因为app.js在当前app的文件夹下。如果entry path书写为app/app.js
在app目录下打包的时候打包目录会被映射为xxx/app/app/app.js

所以entry path应该书写为./app.js

@theJian
Copy link
Owner

theJian commented Nov 10, 2016

你打包报错信息是什么?
确认 entrypath.resolve(__dirname, 'app/app.js') 吗?

@XIEJUNXIRUOFENG
Copy link

ERROR in Entry module not found: Error: Can't resolve 'babel' in 'F:\react\build-a-hn-front-page'
BREAKING CHANGE: It's no longer allowed to omit the '-loader' suffix when using loaders.
You need to specify 'babel-loader' instead of 'babel'.
改成babel-loader可以但是怎么编译上万行。请问大神怎么回事

@luuman
Copy link

luuman commented Feb 10, 2017

me too!

@theJian
Copy link
Owner

theJian commented Feb 11, 2017

你用的應該是 webpack 2, 這份文檔寫成的時候是 webpack 1

@kanekis-byte
Copy link

loader: 'babel-loader' 改成这样,打包成功

@theJian
Copy link
Owner

theJian commented Feb 12, 2017

f52d9ca

@ghost
Copy link

ghost commented Feb 24, 2017

为什么打包的时候,提示这个错误呢 ERROR in ./app/app.js 然后后面还有一大段错误
我的webpack.config.js写的和作者的一模一样

@ghost
Copy link

ghost commented Feb 24, 2017

确切的说webpack.config.js上我就改了一处,把loader:"babel"改成了loader:"babel-loader"

@theJian
Copy link
Owner

theJian commented Feb 24, 2017

这里的报错是因为教程中的配置是针对 webpack 1.x, 我会抽空更新至 webpack 2.x

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants