Comments (4)
You need to use an array if you're using loaders
(note the plural form):
{
test: /\.js$/,
loaders: [ 'happypack/loader?id=js' ],
exclude: /node_modules/
},
from happypack.
So, webpack 1.x accepts loaders in two forms and two variants:
// form 1: a single loader with an "object" query:
{
loader: 'my-single-loader',
query: { "foo": "bar" } // this is optional
}
// form 1, variant 2: a single loader with inline query:
{
loader: 'my-single-loader?foo=bar',
query: {} // this is optional
}
// form 2: multiple loaders, inline queries:
{
loaders: [ 'a', 'b?foo=bar' ]
}
HappyPack only accepts loaders
as an Array. But it lets you either use strings with inline queries (like form 1 variant 2 above) or an object with path: String
and query: String
, somewhat similar to Webpack 2, but Webpack 2 allows you to use objects for query which we can easily support if needed.
I should probably do that last bit to relieve some of this confusion.
from happypack.
Interesting, I had the same problem and found the solution here. In your README.md you specify a single jsx
loader, but you use the word loaders
. I copied this example in order to test, perhaps that is what happened to the OP.
from happypack.
The README was amended to now only use loaders
(plural) everywhere. Is there anything else for this ticket?
from happypack.
Related Issues (20)
- Cannot complete npm install of happypack repo HOT 9
- It works in CSS, but it doesn't work in Babel HOT 2
- webpack4 is more slower?
- How do you remove the happypack cache? HOT 5
- The translation of thread and process
- can't resolve module "happypack/loader"
- not support SASS-LOADER implementation HOT 4
- [email protected] new webpack api support request
- Channel closed HOT 2
- happypack and scoped/postcss-loader conflict?
- Non-deterministic build output when used with ts-loader
- customized babel plugin throw an error
- Cannot read property 'normal' of undefined HOT 5
- Example references missing example-utils repo
- How to use in webpack-chain
- unable to locate the plugin list! This most likely indicates an internal error. HOT 5
- Happypack v5.0.0 breaking emoji-mart v3.0.0
- build error HOT 2
- Happypack semver issue
- Loaded 0 entries from cache. (0 were stale)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from happypack.