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

preLoaders 造成webpack無法執行? #64

Closed
dn-la opened this issue Mar 2, 2017 · 3 comments
Closed

preLoaders 造成webpack無法執行? #64

dn-la opened this issue Mar 2, 2017 · 3 comments

Comments

@dn-la
Copy link

dn-la commented Mar 2, 2017

嗨, 您好
在學習CH05的時候,遇到一個問題
發現在 webpack.config.js 裡面的 module: { preLoaders: [ { ... } ],
似乎造成webpack錯誤 無法執行

如下terminal截圖
image

稍微查了一下,解決方法是用 webpack@2.1.0-beta.22 版本
我目前是 "webpack": "^2.2.0", 應該也是latest的吧....

可以請問一下您目前有遇到這個問題嗎~~?
是可以有其他解法或 還是就使用stable版本的webpack呢

@dn-la dn-la changed the title preLoaders 不能用? preLoaders 造成webpack無法執行? Mar 2, 2017
@walkingOnAir
Copy link

https://webpack.js.org/guides/migrating/
新版本全部用rules
rules: [ { test: /\.js$|\.jsx$/, loader: "eslint-loader", include: ${__dirname}/src, exclude: /bundle\.js$/, enforce: "pre" } ]

@s1012602
Copy link

我在學習ch09遇到和你一樣的問題

@dn-la
Copy link
Author

dn-la commented Mar 17, 2017

@s1012602 我後來就直接使用比較低版本的webpack了 or 直接clone 檔案下來學習
不過之後在使用上我還是有疑問到底要用什麼版本XD

@headhsu2568
Copy link

使用 webpack 2.3.3, 可以試試看以下這個寫法:
PreLoader 放在 rules 中有設定 enforce: 'pre' 的 block:

image

@dn-la dn-la closed this as completed Sep 24, 2021
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

4 participants