0

参考之前的问题

Searchkit 分页未显示。@artem-timofieiev 在这里分享代码:react searchkit with material-ui (pagination is-disabled)

我究竟在哪里粘贴这段代码?

resolve: {
     alias: {
     react: path.resolve('./node_modules/react'),
     lodash: path.resolve('./node_modules/lodash')
      }
    }
4

1 回答 1

0

把它放在你的 webpack 配置中。主要来自基础

var path = require("path")
var webpack = require('webpack')

module.exports = {
  context: __dirname,

  entry: {
    // Add as many entry points as you have container-react-components here
    App: './reactjs/App',
    vendors: ['react'],
  },

  output: {
      path: path.resolve('./example/static/bundles/local/'),
      filename: "[name]-[hash].js"
  },

  externals: [
  ], // add all vendor libs

  plugins: [
    new webpack.optimize.CommonsChunkPlugin({ name: 'vendors', filename: 'vendors.bundle.js', minChunks: Infinity }),
  ], // add all common plugins here

  module: {
    loaders: [] // add all common loaders here
  },

  resolve: {
      alias: {
      react: path.resolve('./node_modules/react'),
     lodash: path.resolve('./node_modules/lodash')
   }
 },
}

干杯....

于 2017-11-21T09:04:30.460 回答