Skip to content

Instantly share code, notes, and snippets.

@TN1ck
Created May 20, 2015 15:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save TN1ck/2571fe89aac13036d910 to your computer and use it in GitHub Desktop.
Save TN1ck/2571fe89aac13036d910 to your computer and use it in GitHub Desktop.
'use strict';
var webpack = require('webpack');
var ExtractTextPlugin = require("extract-text-webpack-plugin");
module.exports = {
devtool: 'eval',
entry: [
'webpack-dev-server/client?http://localhost:3000',
'webpack/hot/only-dev-server',
'./scripts/index'
],
output: {
path: __dirname + '/build/',
filename: 'bundle.js',
publicPath: '/build/'
},
plugins: [
new webpack.HotModuleReplacementPlugin(),
new webpack.NoErrorsPlugin(),
new ExtractTextPlugin("[name].css")
],
resolve: {
extensions: ['', '.js', '.jsx', '.css', '.scss']
},
module: {
loaders: [
{ test: /\.jsx$/, loaders: [
'react-hot',
'jsx?harmony',
'babel-loader',
], exclude: /node_modules/ },
{ test: /\.js$/, loaders: [
'react-hot',
'jsx?harmony',
'babel-loader',
], exclude: /node_modules/ },
{ test: /\.css$/, loaders: [
'style-loader',
'css-loader',
'autoprefixer-loader',
], exclude: /node_modules/ },
{
test: /\.less$/,
// loader: ExtractTextPlugin.extract("style-loader", "css-loader!less-loader")
loader: "style!css!less"
},
]
},
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment