Wie zu verwenden noParse im webpack?

Ausschließen will ich dies von meinem webpack-Datei, indem Sie diese Zeile code, die mir gegeben unten.

noParse: /node_modules\/localforage\/dist\/localforage.js/,

Aber egal was ich versuche ich es hält auf zu sagen Fehler, wie

ReferenceError: Unknown plugin "add-module-Exporte" angegeben C:/..../node_modules\localforage\.babelrc

Hier ist mein webpack config-Datei:

var path = require('path');
 var HtmlWebpackPlugin = require('html-webpack-plugin');

 module.exports = {
   entry: './app/index.js',
   output: {
     path: path.resolve(__dirname, 'dist'),
     filename: 'index_bundle.js',
     publicPath: '/'
   },
   devServer: {
    historyApiFallback: true,
  },
   module: {
     rules: [
       { test: /\.(js)$/, use: 'babel-loader' },

       { test: /\.css$/, use: [ 'style-loader', 'css-loader' ]}
     ]
   },
   plugins: [
     new HtmlWebpackPlugin({
       template: 'app/index.html'
     })
  ]
};
  • es ist nicht ganz klar. Wo ist noParse: /node_modules\/localforage\/dist\/localforage.js/, geschrieben???
  • nun, ich bin nicht vertraut mit webpack, ausschließen will ich node_modules und localforage.js aber ich weiß nicht wo, es zu tun.
  • Sie sollten nicht ausschließen node_modules. warum wollen Sie ausschließen node_modules Ordner?
  • Ich weiß nicht, warum auch, aber das, was dieses Modul sagt mir zu tun, für die Arbeit mit webpack https://github.com/localForage/localForage es sagt Webpack will emit a warning about using a prebuilt javascript file which is fine. If you want to remove the warning you should exclude localforage from being parsed by webpack using the following conf : module: { noParse: /node_modules\/localforage\/dist\/localforage.js/, loaders: [...], ich möchte in der Lage sein zu verwenden, die LocalForage
InformationsquelleAutor Mr.Banks | 2017-07-21
Schreibe einen Kommentar