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

Update webpack configuration docs #27

Merged
merged 1 commit into from
Mar 14, 2016
Merged

Conversation

silvenon
Copy link
Collaborator

According to recent updates, we now import flexboxgrid directly, not via SCSS files. This means that flexboxgrid is the one that users should be targeting in their loader configuration, not react-flexbox-grid.

Fixes #21.
Refs #26.

According to recent updates, we now import flexboxgrid directly, not via SCSS files. This means that flexboxgrid is the one that users should be targeting in their loader configuration, not react-flexbox-grid.

Fixes #21.
Refs #26.
@roylee0704
Copy link
Owner

Cool! :) Great pr!

roylee0704 added a commit that referenced this pull request Mar 14, 2016
@roylee0704 roylee0704 merged commit 58fa5d8 into master Mar 14, 2016
@silvenon silvenon deleted the silvenon-webpack-docs branch March 14, 2016 12:25
@gazzer82
Copy link

Ok thanks for that, i have tried that but still no classes on my Div's . . .

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

console.log(__dirname + '/node_modules/react-flexbox-grid');
console.log(__dirname);
module.exports = {
  entry: [
    'webpack-dev-server/client?http://0.0.0.0:3000', // WebpackDevServer host and port
    'webpack/hot/only-dev-server', // "only" prevents reload on syntax errors
    './src/index'
  ],
  devtool: 'eval',
  resolve: {
        extensions: [
            '', '.js', '.jsx',
            '.css', '.styl', '.scss', '.less', '.sass'
          ],
          alias: {
          }
  },
  output:{
    path: __dirname + '/dist/js',
    publicPath: '/js',
    filename: "app.js",
    pathinfo: true
  },
  module: {
    loaders:[
      //JSX
      {
        test: /\.jsx$/,
        exclude: /(node_modules)/,
        loaders: ['react-hot','babel']
      },
      //JS
      {
        test: /\.js$/,
        exclude: /(node_modules)/,
        loaders: ['react-hot','babel']
      },
      //Load flexgrid
      {
        test: /\.css$/,
        loader: 'style!css?modules',
        include: /flexboxgrid/,
        exclude: /(node_modules)/,
      },
      //SCSS
      {
        test: /\.scss$/,
        exclude: /(node_modules)/,
        loader: 'style!css!sass'
      },
      //CSS
      { test: /\.css$/,
        loader: "style-loader!css-loader",
        exclude: __dirname + './node_modules/react-flexbox-grid',
      },
      //Fonts
      {
      test: /\.(woff|woff2)$/,
        loader: "url?limit=10000&mimetype=application/font-woff"
      },
      {
      test: /\.ttf$/,
        loader: "url?limit=10000&mimetype=application/octet-stream"
      },
      {
      test: /\.eot$/,
        loader: "file"
      },
      //Images
      {
        test: /\.(jpe?g|png|gif|svg)$/i,
        loader: "url?limit=25000"
      }

    ]
  },
  plugins: [
    new webpack.HotModuleReplacementPlugin(),
    new webpack.NoErrorsPlugin(),
    new HtmlWebpackPlugin({
      template: 'underscore-template-loader!./html/index_template.html',
      //favicon: './images/favicon.ico',
      title: 'LED Calculator',
      inject: 'body',
      filename: '../index.html'
    })
  ]
}
```;

@gazzer82
Copy link

Actually just fixed it, realised i wasn't excluding flexboxgrid from my regular loader, thanks for the help!

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

Successfully merging this pull request may close these issues.

3 participants