1
0
mirror of https://github.com/fspc/workstand.git synced 2025-02-23 09:13:23 -05:00

Update webpack config.

This commit is contained in:
Drew Larson 2017-01-15 11:24:51 -06:00
parent b5f01ca238
commit 79048018c5
3 changed files with 10 additions and 5 deletions

View File

@ -16,7 +16,8 @@
"material-ui": "^0.16.6",
"moment": "^2.13.0",
"react": "^15.4.1",
"react-dom": "^15.4.1"
"react-dom": "^15.4.1",
"react-tap-event-plugin": "^2.0.1"
},
"devDependencies": {
"babel": "^6.5.2",
@ -33,7 +34,6 @@
"postcss-loader": "^0.9.1",
"react-addons-css-transition-group": "^15.4.1",
"react-hot-loader": "^1.3.0",
"react-tap-event-plugin": "^1.0.0",
"react-toolbox": "^0.16.2",
"sass-loader": "^3.2.0",
"style-loader": "^0.13.1",

View File

@ -27,8 +27,7 @@ module.exports = {
resolve: {
modulesDirectories: [
'node_modules',
'bower_components',
path.resolve(__dirname, './node_modules')
'bower_components'
],
extensions: ['', '.js', '.jsx', '.scss']
},

View File

@ -1,5 +1,6 @@
var webpack = require('webpack')
var BundleTracker = require('webpack-bundle-tracker')
const ExtractTextPlugin = require('extract-text-webpack-plugin')
var config = require('./webpack.base.config.js')
@ -7,6 +8,7 @@ config.output.path = require('path').resolve('./assets/dist')
config.plugins = config.plugins.concat([
new BundleTracker({filename: './webpack-stats-prod.json'}),
new ExtractTextPlugin('react-toolbox.css', {allChunks: true}),
// removes a lot of debugging code in React
new webpack.DefinePlugin({
@ -27,7 +29,11 @@ config.plugins = config.plugins.concat([
// Add a loader for JSX files
config.module.loaders.push(
{ test: /\.jsx?$/, exclude: /node_modules/, loader: 'babel' }
{ test: /\.jsx?$/, exclude: /node_modules/, loader: 'babel' },
{
test: /(\.scss|\.css)$/,
loader: ExtractTextPlugin.extract('style', 'css?sourceMap&modules&importLoaders=1&localIdentName=[name]__[local]___[hash:base64:5]!postcss!sass?sourceMap!toolbox')
}
)
module.exports = config