mirror of
https://github.com/fspc/workstand.git
synced 2025-02-23 09:13:23 -05:00
React build.
This commit is contained in:
parent
893cd40bc1
commit
4f27974af4
47
bikeshop_project/assets/dist/main-c9f2076e75bd0a70cef5.js
vendored
Normal file
47
bikeshop_project/assets/dist/main-c9f2076e75bd0a70cef5.js
vendored
Normal file
File diff suppressed because one or more lines are too long
1
bikeshop_project/webpack-stats-prod.json
Normal file
1
bikeshop_project/webpack-stats-prod.json
Normal file
@ -0,0 +1 @@
|
|||||||
|
{"status":"done","chunks":{"main":[{"name":"main-c9f2076e75bd0a70cef5.js","path":"/Users/drew/Development/bikeshop/bikeshop_project/assets/dist/main-c9f2076e75bd0a70cef5.js"}]}}
|
33
bikeshop_project/webpack.prod.config.js
Normal file
33
bikeshop_project/webpack.prod.config.js
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
var webpack = require('webpack')
|
||||||
|
var BundleTracker = require('webpack-bundle-tracker')
|
||||||
|
|
||||||
|
var config = require('./webpack.base.config.js')
|
||||||
|
|
||||||
|
config.output.path = require('path').resolve('./assets/dist')
|
||||||
|
|
||||||
|
config.plugins = config.plugins.concat([
|
||||||
|
new BundleTracker({filename: './webpack-stats-prod.json'}),
|
||||||
|
|
||||||
|
// removes a lot of debugging code in React
|
||||||
|
new webpack.DefinePlugin({
|
||||||
|
'process.env': {
|
||||||
|
'NODE_ENV': JSON.stringify('production')
|
||||||
|
}}),
|
||||||
|
|
||||||
|
// keeps hashes consistent between compilations
|
||||||
|
new webpack.optimize.OccurenceOrderPlugin(),
|
||||||
|
|
||||||
|
// minifies your code
|
||||||
|
new webpack.optimize.UglifyJsPlugin({
|
||||||
|
compressor: {
|
||||||
|
warnings: false
|
||||||
|
}
|
||||||
|
})
|
||||||
|
])
|
||||||
|
|
||||||
|
// Add a loader for JSX files
|
||||||
|
config.module.loaders.push(
|
||||||
|
{ test: /\.jsx?$/, exclude: /node_modules/, loader: 'babel' }
|
||||||
|
)
|
||||||
|
|
||||||
|
module.exports = config
|
Loading…
x
Reference in New Issue
Block a user