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

how do we load json #27

Open
Pomax opened this issue Jun 14, 2015 · 4 comments
Open

how do we load json #27

Pomax opened this issue Jun 14, 2015 · 4 comments

Comments

@Pomax
Copy link

Pomax commented Jun 14, 2015

While the howto suggests we can load in json quite easily, telling webpack to resolve .json doesn't actually work at all. It just throws up file errors when you try it. If this repo is still being maintained, can it be update with how to load in data from .json resource?

@nkbt
Copy link

nkbt commented Jun 14, 2015

npm install --save json-loader
// webpack.config.js

// ...
  module: {
    loaders: [
      // ...
      {test: /\.json$/, loader: 'json'}
    ],
// ...

@Pomax
Copy link
Author

Pomax commented Jun 14, 2015

@nkbt thanks. looking forward to seeing that in the howto

@jerrylau91
Copy link

@nkbt Thanks

@jaydenseric
Copy link

Nothing special is needed to import JSON anymore in Webpack v2, see: webpack/webpack#3363. This issue can probably be closed.

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