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

Show webpack 2 config example in docs: rules not loaders #1137

Merged
merged 1 commit into from
May 27, 2017
Merged

Show webpack 2 config example in docs: rules not loaders #1137

merged 1 commit into from
May 27, 2017

Conversation

Stupidism
Copy link
Contributor

Issue:
It took me 2 hours to figure it out how to config webpack in the new version.
All I wanted is something like this. But I'm not familiar with webpack breaking changes.

const path = require('path');

module.exports = {
  module: {
    rules: [
      {
        test: /\.md$/,
        loaders: ['raw-loader'],
        include: path.resolve(__dirname, '../'),
      },
    ],
  },
};

What I did

changed module.loaders into module.rules in docs/**/custome-webpack-config.md

How to test

@shilman
Copy link
Member

shilman commented May 27, 2017

Thanks! @ndelangen this needs to go in #1093 migration guide for sure!

@codecov
Copy link

codecov bot commented May 27, 2017

Codecov Report

Merging #1137 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #1137   +/-   ##
=======================================
  Coverage   12.86%   12.86%           
=======================================
  Files         198      198           
  Lines        4501     4501           
  Branches      715      715           
=======================================
  Hits          579      579           
  Misses       3289     3289           
  Partials      633      633

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 96a90d3...b019a1b. Read the comment docs.

@shilman
Copy link
Member

shilman commented May 27, 2017

@Stupidism sorry for the trouble. We are hustling to document the changes for 3.0 before the release, so things are a little inconsistent for the next couple days. Thanks so much for your contribution! 👍

@ndelangen ndelangen merged commit 68b76b5 into storybookjs:master May 27, 2017
@ndelangen ndelangen changed the title docs(custom-webpack-config): rules not loaders Show webpack 2 config example in docs: rules not loaders May 27, 2017
@Stupidism Stupidism deleted the fix-custom-webpack-config branch May 27, 2017 16:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants