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:
parent
b5f01ca238
commit
79048018c5
@ -16,7 +16,8 @@
|
|||||||
"material-ui": "^0.16.6",
|
"material-ui": "^0.16.6",
|
||||||
"moment": "^2.13.0",
|
"moment": "^2.13.0",
|
||||||
"react": "^15.4.1",
|
"react": "^15.4.1",
|
||||||
"react-dom": "^15.4.1"
|
"react-dom": "^15.4.1",
|
||||||
|
"react-tap-event-plugin": "^2.0.1"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"babel": "^6.5.2",
|
"babel": "^6.5.2",
|
||||||
@ -33,7 +34,6 @@
|
|||||||
"postcss-loader": "^0.9.1",
|
"postcss-loader": "^0.9.1",
|
||||||
"react-addons-css-transition-group": "^15.4.1",
|
"react-addons-css-transition-group": "^15.4.1",
|
||||||
"react-hot-loader": "^1.3.0",
|
"react-hot-loader": "^1.3.0",
|
||||||
"react-tap-event-plugin": "^1.0.0",
|
|
||||||
"react-toolbox": "^0.16.2",
|
"react-toolbox": "^0.16.2",
|
||||||
"sass-loader": "^3.2.0",
|
"sass-loader": "^3.2.0",
|
||||||
"style-loader": "^0.13.1",
|
"style-loader": "^0.13.1",
|
||||||
|
@ -27,8 +27,7 @@ module.exports = {
|
|||||||
resolve: {
|
resolve: {
|
||||||
modulesDirectories: [
|
modulesDirectories: [
|
||||||
'node_modules',
|
'node_modules',
|
||||||
'bower_components',
|
'bower_components'
|
||||||
path.resolve(__dirname, './node_modules')
|
|
||||||
],
|
],
|
||||||
extensions: ['', '.js', '.jsx', '.scss']
|
extensions: ['', '.js', '.jsx', '.scss']
|
||||||
},
|
},
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
var webpack = require('webpack')
|
var webpack = require('webpack')
|
||||||
var BundleTracker = require('webpack-bundle-tracker')
|
var BundleTracker = require('webpack-bundle-tracker')
|
||||||
|
const ExtractTextPlugin = require('extract-text-webpack-plugin')
|
||||||
|
|
||||||
var config = require('./webpack.base.config.js')
|
var config = require('./webpack.base.config.js')
|
||||||
|
|
||||||
@ -7,6 +8,7 @@ config.output.path = require('path').resolve('./assets/dist')
|
|||||||
|
|
||||||
config.plugins = config.plugins.concat([
|
config.plugins = config.plugins.concat([
|
||||||
new BundleTracker({filename: './webpack-stats-prod.json'}),
|
new BundleTracker({filename: './webpack-stats-prod.json'}),
|
||||||
|
new ExtractTextPlugin('react-toolbox.css', {allChunks: true}),
|
||||||
|
|
||||||
// removes a lot of debugging code in React
|
// removes a lot of debugging code in React
|
||||||
new webpack.DefinePlugin({
|
new webpack.DefinePlugin({
|
||||||
@ -27,7 +29,11 @@ config.plugins = config.plugins.concat([
|
|||||||
|
|
||||||
// Add a loader for JSX files
|
// Add a loader for JSX files
|
||||||
config.module.loaders.push(
|
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
|
module.exports = config
|
Loading…
x
Reference in New Issue
Block a user