Created
February 9, 2017 19:57
-
-
Save coliveravenegas/2d0863a98a8777fc0b72810059a4a878 to your computer and use it in GitHub Desktop.
This file contains 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
var ExtractTextPlugin = require('extract-text-webpack-plugin'); | |
var path = require('path'); | |
const common = { | |
entry: { | |
//JavascriptFiles | |
"bundles": "./crehana/frontdev/jsx/bundles.js", | |
"bundle-detail": "./crehana/frontdev/jsx/bundle-detail.js", | |
"catalog": "./crehana/frontdev/jsx/catalog.js", | |
"homepage": "./crehana/frontdev/jsx/homepage.js", | |
"resource-detail": "./crehana/frontdev/jsx/resource-detail.js", | |
"resources-list": "./crehana/frontdev/jsx/resources-list.js", | |
"welcome-flux": "./crehana/frontdev/jsx/welcome-flux.js", | |
"tutorials-list": "./crehana/frontdev/jsx/tutorials-list.js", | |
"tutorial-detail": "./crehana/frontdev/jsx/tutorial-detail.js", | |
"customprofile": "./crehana/frontdev/jsx/customprofile.js", | |
"base": "./crehana/frontdev/jsx/base.js", | |
"lessons": "./crehana/frontdev/jsx/lessons.js", | |
"teach": "./crehana/frontdev/jsx/teach.js", | |
"afiliate": "./crehana/frontdev/jsx/afiliate.js", | |
"student-perks": "./crehana/frontdev/jsx/student-perks.js", | |
"login": "./crehana/frontdev/jsx/login.js", | |
"signup": "./crehana/frontdev/jsx/signup.js", | |
"checkout": "./crehana/frontdev/jsx/checkout.js", | |
"fullPageLogin": "./crehana/frontdev/jsx/fullPageLogin.js", | |
"fullPageRegister": "./crehana/frontdev/jsx/fullPageRegister.js", | |
"login-register-modal": "./crehana/frontdev/jsx/login-register-modal.js", | |
"searchbox": "./crehana/frontdev/jsx/searchbox.js", | |
}, | |
// devtool: 'source-map', | |
output: { | |
path: path.join(__dirname, '/crehana/static/js'), | |
filename: "[name].min.js" | |
}, | |
module: { | |
rules: [ | |
{ | |
test: /\.js$/, | |
exclude: /(node_modules|bower_components)/, | |
loader: "babel-loader" | |
}, | |
{ | |
test: /\.scss$/, | |
// use: ExtractTextPlugin.extract({ | |
// fallbackLoader: "style-loader", | |
// loader: "css-loader?modules&importLoaders=1&localIdentName=[path]___[name]__[local]___[hash:base64:5]!postcss-loader!sass-loader" | |
// }) | |
use: [ | |
"style-loader?sourceMap", | |
"css-loader", | |
// "css-loader?modules&importLoaders=1&localIdentName=[path]---[name]--[local]---[hash:base64:5]", | |
"postcss-loader", | |
"sass-loader?sourceMap" | |
] | |
}, | |
] | |
}, | |
plugins: [ | |
// new ExtractTextPlugin({ | |
// filename: path.join(__dirname, '/dist/[name].css'), | |
// allChunks: true | |
// }) | |
// new webpack.optimize.UglifyJsPlugin({minimize: true, compress: {warnings: false}}) | |
] | |
} | |
module.exports = function(env) { | |
console.log('env', env); | |
return common; | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment