Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Webpack config #598

Merged
merged 11 commits into from
Aug 26, 2016
Merged

Webpack config #598

merged 11 commits into from
Aug 26, 2016

Conversation

hbussell
Copy link
Contributor

To use this you need to add a webpack-config setting in your .reactserverrc which points to a file that exports a default function.

{
  "webpack-config": "./webpack.js"
}

The config file function takes a webpack config array from packageCodeForBrowser and can change the data before it's passed to the webpack constructor.

export default (webpackConfig) => {

  webpackConfig.resolve.alias = {
    'myapp': '/abs/project'
  }

  return webpackConfig
}

@CLAassistant
Copy link

CLAassistant commented Aug 20, 2016

CLA assistant check
All committers have signed the CLA.

@doug-wade
Copy link
Collaborator

@hbussell This change is awesome and amazing and incredible, but your build failed with some linting errors

/home/travis/build/redfin/react-server/packages/react-server-cli/src/compileClient.js
  43:2  error  Mixed spaces and tabs                                 no-mixed-spaces-and-tabs
  43:6  error  Expected indentation of 2 tab characters but found 0  indent
  44:2  error  Mixed spaces and tabs                                 no-mixed-spaces-and-tabs
  44:6  error  Expected indentation of 2 tab characters but found 0  indent
  45:2  error  Mixed spaces and tabs                                 no-mixed-spaces-and-tabs
  45:6  error  Expected indentation of 2 tab characters but found 0  indent
✖ 6 problems (6 errors, 0 warnings)

You can check locally that you've resolved them with npm test in the monorepo root or gulp eslint in packages/react-server-cli.

Thanks so much for your contribution; this is awesome! ✨

@gigabo gigabo added the enhancement New functionality. label Aug 22, 2016
@doug-wade
Copy link
Collaborator

#199

@hbussell
Copy link
Contributor Author

Hey @doug-wade, fixed up the linting problems.
Also added a little bit of doco to for the website.

Thanks for the feedback on the PR!
Cheers :)

@doug-wade doug-wade merged commit 4cfb58d into redfin:master Aug 26, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New functionality.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants