kadirahq / lokka-transport-http

HTTP Transport Layer for Lokka
MIT License
41 stars 38 forks source link

Still exist WARNING (iconv-loader.js) #22

Open leekyuchang opened 8 years ago

leekyuchang commented 8 years ago

This is WARNING message.

WARNING in ./~/lokka-transport-http/~/node-fetch/~/encoding/lib/iconv-loader.js
Critical dependencies:
9:12-34 the request of a dependency is an expression
 @ ./~/lokka-transport-http/~/node-fetch/~/encoding/lib/iconv-loader.js 9:12-34
Jacke commented 7 years ago
       {test: /\.json$/, loader: 'json-loader'},

In webpack loaders section This will fix your problem

funky0leary commented 7 years ago

Didn't fix it for me. I added that to my loaders, and still see the issue.

Artexoid commented 7 years ago

This solution for webpack2 work for me.

  1. npm i node-noop --save
  2. add NormalModuleReplacementPlugin plugin
    plugins: [
    // .... other plugins
    new webpack.NormalModuleReplacementPlugin(
    /\/iconv-loader$/, 'node-noop',
    ),
    ],

    this link help me https://berryware.wordpress.com/tag/iconv-loader/

erikvullings commented 7 years ago

@Artexoid Thanks for the tip! When using webpack + typescript, I also had to import he NormalModuleReplacementPlugin as in:

const { optimize: { CommonsChunkPlugin }, ProvidePlugin, NormalModuleReplacementPlugin } = require('webpack');