@sa-labs/fate-core
Version:
fate-core contains the base assumptions of the fate ecosystem as well as utilities for operating with fate.
53 lines (51 loc) • 1.32 kB
JavaScript
var webpack = require('webpack');
const path = require('path');
const constants = require('fate-core')();
var ExtractTextPlugin = require('extract-text-webpack-plugin');
module.exports = {
devtool: 'source-map',
entry: [
'./src/index'
],
output: {
path: path.join(__dirname, 'dist'),
filename: 'bundle.js',
publicPath: '/static/'
},
plugins: [
new webpack.optimize.OccurenceOrderPlugin(),
new webpack.DefinePlugin({
'process.env': {
'NODE_ENV': JSON.stringify('production')
}
}),
new webpack.optimize.UglifyJsPlugin({
compressor: {
warnings: false
}
}),
new ExtractTextPlugin('styles/[name]-[id]-[hash].css', { allChunks: true })
],
module: {
loaders: [{
test: /\.js$/,
loaders: ['babel'],
include: path.join(__dirname, 'src')
},{
test: /\.css$/,
loader: ExtractTextPlugin.extract('style-loader', 'css-loader?modules&importLoaders=1&localIdentName=[name]__[local]___[hash:base64:5]!postcss-loader')
}]
},
postcss: [
require('postcss-import')(),
require('postcss-url')(),
require('postcss-constants')({
defaults: constants
}),
require('postcss-cssnext')({
browsers: 'last 2 versions'
}),
require('postcss-nested'),
require('lost')
]
};