lodash / babel-plugin-lodash

Modular Lodash builds without the hassle.
Other
1.96k stars 92 forks source link

lodash stops working? #167

Closed bradennapier closed 7 years ago

bradennapier commented 7 years ago

as soon as I add this plugin lodash stops working - the function is called but always returns undefined for _.get()

My webpack config looks something like

module: {
    rules: [
      {
        test:     /\.js$/,
        exclude: /node_modules/,
        use:     [ {
          loader: 'babel-loader' ,
          options: {
            // Don't use the babelrc file!
            babelrc: false,
            presets: [
              'stage-0',
              // Setup for TreeShaking
              ['env', {
                modules: false,
              }],
            ],
            plugins: [
               'lodash'
             ]
          }
        } ],
      },
    ],
  },
  plugins: [
    new LodashModuleReplacementPlugin(),
...
bradennapier commented 7 years ago

ahh - i also missed this in your docs until i read someone elses - might be worth making a STRONG note of that it is easy to miss when you are just following the examples to get something going and see if it is gonna do what is needed.

Thanks though, this is great!