Skip to content

You don't need this loader #1

@sokra

Description

@sokra

You don't need this loader for two reasons:

1. You don't need loaders that just wrap browserify transforms.

There is a loader that does that: transform-loader.

{
  module: {
    postLoaders: [
      {
        loader: "transform?envify"
      }
    ]
  }
}

2. The DefinePlugin offers the same functionality

{
  plugins: [
    new webpack.DefinePlugin({
      "process.env": Object.keys(process.env).reduce(function(o, k) {
        o[k] = JSON.stringify(process.env[k]);
        return o;
      }, {})
    }
  ]
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions