Created
October 26, 2015 20:57
-
-
Save josephcc/9906562c565e98d9c76e to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var webpack = require("webpack"); | |
| var path = require('path'); | |
| var ExtractTextPlugin = require('extract-text-webpack-plugin') | |
| module.exports = { | |
| entry: { | |
| app: './app/app.jsx', | |
| }, | |
| output: { | |
| path: '../dist', | |
| filename: '[name].js' | |
| }, | |
| module: { | |
| loaders: [ | |
| { | |
| test: /\.jsx$/, | |
| loader: "babel-loader", | |
| include: path.join(__dirname, 'app') | |
| }, | |
| { | |
| test: /\.(css)(\?.+)$/, | |
| loader: ExtractTextPlugin.extract('style-loader', 'css-loader') | |
| }, | |
| { | |
| test: /\.(otf|eot|svg|ttf|woff|woff2)(\?.+)$/, | |
| loader: 'url-loader?limit=8192' | |
| } | |
| ] | |
| }, | |
| plugins: [ | |
| new webpack.optimize.DedupePlugin(), | |
| new webpack.PrefetchPlugin("react"), | |
| new webpack.PrefetchPlugin("react/lib/ReactComponentBrowserEnvironment"), | |
| new ExtractTextPlugin('../bundle.css') | |
| ] | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment