Created
March 11, 2016 20:15
-
-
Save ryanflorence/0b2f333ef8d3c243d885 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
const webpack = require('webpack') | |
const Configs = require('react-project/webpack') | |
Configs.ServerConfig.module.loaders.unshift({ | |
test: /modules\/client-only\//, | |
loader: 'null-loader' | |
}) | |
Configs.ClientConfig.plugins.push( | |
new webpack.ContextReplacementPlugin(/moment[\/\\]locale$/, /en/) | |
) | |
Configs.ClientConfig.module.loaders.forEach((def) => { | |
if (def.loader.match(/style-loader/)) { | |
def.exclude= /modules\/syntax\.css$/ | |
} | |
if (def.test.test('jpg')) { | |
def.loader = 'url-loader?limit=10000!img-loader?progressive=true' | |
} | |
}) | |
Configs.ClientConfig.module.loaders.push({ | |
test: /modules\/syntax\.css$/, | |
loader: 'style-loader!css-loader' | |
}) | |
module.exports = Configs |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Is this a package or a file you have created it if so can you share it please
'react-project/webpack'