Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Project builds but styles fail to load #154

Open
candronikos opened this issue Jul 14, 2017 · 0 comments
Open

Project builds but styles fail to load #154

candronikos opened this issue Jul 14, 2017 · 0 comments

Comments

@candronikos
Copy link

I can load data into tables and even click through pages but the styles don't show at all. Tried to follow the instructions from the REAME here.

.babelrc

{
  "presets" : ["es2015", "react"],
  "plugins": [
    ["import", { libraryName: "antd", style: 'css' }]
  ]
}

webpack.config.js

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

var BUILD_DIR = path.resolve(__dirname, 'dist');
var APP_DIR = path.resolve(__dirname, 'src');

module.exports = {
  devtool: 'source-map',
  entry: APP_DIR+'/index.jsx',
  output: {
    filename: 'bundle.js',
    path: BUILD_DIR
  },
  module: {
    loaders:  [
      /*
      {
        loader: 'style-loader'
      },
      */
      {
        test: /\.jsx?/,
        //exclude: /node-modules/,
        include: APP_DIR,
        loader: 'babel-loader'
      },
      {
        test: /\.css$/,
        loader: 'css-loader',//ExtractTextPlugin.extract("style-loader", "css-loader"),//
      },
      /*
      {
        test: /\.less$/,
        loader: 'less-loader',//ExtractTextPlugin.extract("style-loader", "css-loader!less-loader"),//
      },
      */
    ]
  },
  /*
  node: {
    fs: 'empty',
    net: 'empty',
    tls: 'empty',
    module: 'empty',
  },
  */
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant