Skip to content

Instantly share code, notes, and snippets.

@ryanflorence
Created March 11, 2016 20:15
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ryanflorence/0b2f333ef8d3c243d885 to your computer and use it in GitHub Desktop.
Save ryanflorence/0b2f333ef8d3c243d885 to your computer and use it in GitHub Desktop.
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
@mohamednageh7
Copy link

Is this a package or a file you have created it if so can you share it please
'react-project/webpack'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment