Bunch of website stuff
This commit is contained in:
@ -3,15 +3,16 @@ const webpack = require('webpack')
|
||||
const autoprefixer = require('autoprefixer')
|
||||
const ExtractTextPlugin = require('extract-text-webpack-plugin')
|
||||
|
||||
const AssetURLPrefix = '[hash:8]/'
|
||||
const outputPrefix = '[chunkhash:8]-'
|
||||
|
||||
module.exports = {
|
||||
entry: {
|
||||
vendor: [ 'react' ],
|
||||
home: path.resolve(__dirname, 'modules/client/home.js')
|
||||
},
|
||||
|
||||
output: {
|
||||
filename: `${AssetURLPrefix}[name].js`,
|
||||
filename: `${outputPrefix}[name].js`,
|
||||
path: path.resolve(__dirname, 'public/__assets__'),
|
||||
publicPath: '/__assets__/'
|
||||
},
|
||||
@ -19,13 +20,17 @@ module.exports = {
|
||||
module: {
|
||||
loaders: [
|
||||
{ test: /\.js$/, exclude: /node_modules/, loader: 'babel' },
|
||||
{ test: /\.css$/, loader: ExtractTextPlugin.extract('style', 'css!postcss') }
|
||||
{ test: /\.css$/, loader: ExtractTextPlugin.extract('style', 'css!postcss') },
|
||||
{ test: /\.json$/, loader: 'json' },
|
||||
{ test: /\.png$/, loader: 'file' },
|
||||
{ test: /\.md$/, loader: 'html!markdown' }
|
||||
]
|
||||
},
|
||||
|
||||
plugins: [
|
||||
new webpack.optimize.OccurrenceOrderPlugin(),
|
||||
new ExtractTextPlugin(`${AssetURLPrefix}styles.css`),
|
||||
new webpack.optimize.CommonsChunkPlugin({ name: 'vendor' }),
|
||||
new ExtractTextPlugin(`${outputPrefix}styles.css`),
|
||||
new webpack.DefinePlugin({
|
||||
'process.env.NODE_ENV': JSON.stringify(process.env.NODE_ENV || 'development')
|
||||
})
|
||||
|
Reference in New Issue
Block a user