Skip to content
This repository was archived by the owner on Aug 20, 2018. It is now read-only.
This repository was archived by the owner on Aug 20, 2018. It is now read-only.

Alternative installation method #12

Closed
@Reggino

Description

@Reggino

Thank you for this!

Since node 5 it is possible to just require .json files (see discussion e.g. webpack/webpack#184 and https://github.com/nodejs/node-v0.x-archive/blob/master/lib/module.js#L485 )

To reflect that, it would be nice if the README.md could point out that the same syntax (require('sample.json')) can be used, using this loader by adding

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

to your Webpack configuration file. It took me a while to figure that out while require-ing node 5 modules.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions