Created
August 9, 2016 13:48
-
-
Save oxpa/393b6d23b57f021db0dd7625f022aebf to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = { | |
//node: {process:false}, | |
entry: {bundle:['./index.js'], main:['./main.js']}, | |
output: { | |
path: __dirname +'/compiled/', | |
filename: '[name].js', | |
libraryTarget: 'umd' | |
}, | |
externals: { "react": "React", "redux": "Redux", "react-dom":"ReactDom", "react-redux":"ReactRedux", "react-router":"ReactRouter"},// "flickity":"Flickity"}, | |
module: { | |
loaders: [ | |
{ | |
test: /\.p?css$/, | |
loader: ["style-loader", "css-loader", "postcss-loader"] | |
}, | |
{ | |
test: /.jsx?$/, | |
loader: 'babel-loader', | |
exclude: /node_modules/, | |
query: { | |
presets: ['react', 'stage-2','es2015-native-modules'], | |
plugins: ["transform-object-rest-spread","transform-object-assign"] | |
} | |
} | |
] | |
}, | |
resolve: { | |
extensions: ["", ".js", "jsx", "js6"], | |
alias: { /*need these for flickity*/ | |
'eventEmitter/EventEmitter': 'wolfy87-eventemitter/EventEmitter', | |
'get-style-property': 'desandro-get-style-property', | |
'matches-selector': 'desandro-matches-selector', | |
'classie': 'desandro-classie' | |
} | |
}, | |
plugins: [ | |
new StaticSiteGeneratorPlugin('main', locals.paths, locals,locals.scope), | |
//new ExtractTextPlugin('style.css') | |
] | |
postcss: function () { | |
return [precss, autoprefixer]; | |
} | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment