| 123456789101112131415161718192021222324252627282930313233343536373839404142434445 |
- var ExtractTextPlugin = require('extract-text-webpack-plugin')
-
- module.exports = {
- entry: [
- 'webpack-dev-server/client?http://localhost:8080',
- 'webpack/hot/only-dev-server',
- './src/index.js',
- ],
- output: {
- path: __dirname + '/dist',
- publicPath: '/',
- filename: 'bundle.js'
- },
- module: {
- loaders: [
- {
- test: /\.jsx?$/,
- exclude: /node_modules/,
- loader: 'react-hot-loader!babel-loader'
- },
- {
- test: /\.s?css$/,
- loader: ExtractTextPlugin.extract({
- fallback: 'style-loader',
- use: ['css-loader', 'sass-loader']
- })
- },
- {
- test: /\.(eot|svg|ttf|woff|woff2)$/,
- loader: 'file-loader?name=fonts/[name].[ext]'
- }
- ]
- },
- resolve: {
- extensions: ['*', '.js', '.jsx']
- },
- plugins: [
- new ExtractTextPlugin({ filename: 'style.css', allChunks: true })
- ],
- devServer: {
- contentBase: './dist',
- hot: true,
- historyApiFallback: true
- },
- }
|