Closed ptchiangchloe closed 7 years ago
@ptchiangchloe deck.gl examples folder has many standalone examples using webpack, including hello-world-webpack2 that you can use as a working basis.
Your webpack config is rather complex so hard to say at a glance what is going wrong. But it looks like it fails when importing package.json? You seem to have overridden json loader to raw loader that is probably the problem. Can you exclude deck.gl in that rule?
@apercu
I would guess adding the following rule will fix the issue
{ test: /deck.gl\/package.json$/, loader: 'json-loader' }
Yes, that's working perfectly. I don't know why packjson.json and normal json need two different loaders. Do you know there is any doc referencing that?
Thanks for the help.
Han
I think the question is: why does something in your app need to load JSON with a raw loader instead of a JSON loader. Try to delete that line in your webpack to see if you can figure out which component is requiring that setup.
Hi @ibgreen,
You are right, raw-loader is no longer needed in the webpack.common.js. The reason I add the rule before is that I was trying to load a json file and json-loader cause an error then I read something online says can solve the issue.
Sometimes I do feel lost in all the loaders from webpack.
Thanks for the help anyway.
Hi, I have trouble to bundle deck.gl into my app, The error I got is:
Here is my webpack config:
webpack.common.js:
webpack.dev.js:
package.json: