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

Replace System.import with import #901

Merged
merged 1 commit into from
Mar 29, 2018
Merged

Replace System.import with import #901

merged 1 commit into from
Mar 29, 2018

Conversation

rubenmoya
Copy link
Contributor

@rubenmoya rubenmoya commented Mar 28, 2018

Fixes #900

I've read Webpack's documentation which links to Babel's documentation and this seems the way to go.

I've never used dynamic imports before, so feedback is appreciated.

@styleguidist-bot
Copy link
Collaborator

Warnings
⚠️

Changes were made to package.json, but not to package-lock.json.

Perhaps you need to run npm install and commit changes in package-lock.json. Make sure you’re using npm 5+.

Generated by 🚫 dangerJS

@codecov-io
Copy link

codecov-io commented Mar 28, 2018

Codecov Report

Merging #901 into master will not change coverage.
The diff coverage is 100%.

Impacted Files Coverage Δ
src/rsg-components/Editor/EditorLoader.js 100% <100%> (ø) ⬆️

@rubenmoya
Copy link
Contributor Author

About the package-lock.json it's not updated because system-import-transformer requires this package, so it was already there.

Copy link
Member

@sapegin sapegin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thanks!

@sapegin sapegin added this to the 7.0.0 milestone Mar 28, 2018
@rubenmoya
Copy link
Contributor Author

Should I add the plugin to env.test.plugins?

@sapegin
Copy link
Member

sapegin commented Mar 28, 2018

I think no, otherwise CI would fail.

@rubenmoya
Copy link
Contributor Author

I just saw that we were doing this already back in 2017: 0b52d9b 😂

@sapegin
Copy link
Member

sapegin commented Mar 29, 2018

I guess I’ve decided to remove an extra Babel plugin because webpack wasn't complaining about System.import ;-)

@sapegin sapegin merged commit e3e2112 into styleguidist:master Mar 29, 2018
sapegin added a commit that referenced this pull request Mar 31, 2018
👋 **[Support Styleguidist](https://opencollective.com/styleguidist) on Open Collective** 👋

## Breaking changes

### Node 6 is the lowest supported version

Styleguidist doesn’t support Node 4 anymore.

(#744 #839 by @kohgpat)

### New format of template option

We’re now using [mini-html-webpack-plugin](https://github.com/styleguidist/mini-html-webpack-plugin) and [@vxna/mini-html-webpack-template](https://github.com/vxna/mini-html-webpack-template) instead of [html-webpack-plugin](https://github.com/jantimon/html-webpack-plugin).

This will make things like [adding a favicon](https://react-styleguidist.js.org/docs/cookbook#how-to-add-a-favicon) or fonts from [Google Fonts](https://react-styleguidist.js.org/docs/cookbook#how-to-add-fonts-from-google-fonts) much easier.

If you’re using a custom HTML template, you need to update your style guide config.

```js
// 6.x
module.exports = {
  template: './styleguie/template.html'
}

// 7.x
module.exports = {
  template: {
    // This is just an example, there are many more available options
    favicon: 'https://assets-cdn.github.com/favicon.ico'
  }
}
```

See more [in the docs](https://react-styleguidist.js.org/docs/configuration#template).

(#896 #907 by @sapegin)

### Changed Node API

`server` method now returns an object containing a webpack `Compiler` instance and the Styleguidist server, see examples [in the docs](https://react-styleguidist.js.org/docs/api.html#servercallback).

(#828 by @cmswalker)

## New features

### Webpack 4 support

Webpack 3 is still supported too.

(#857 by @kontrollanten, #900 #901 by @rubenmoya)

### Examples are wrapped in React.Fragment

You don’t need to wrap multiple JSX tags in a div anymore.

```jsx
// 6.x
<div>
  <Button primary>Primary button</Button>
  <Button secondary>Secondary button</Button>
</div>

// 7.x
<Button primary>Primary button</Button>
<Button secondary>Secondary button</Button>
```

(#840 #842 by @tizmagik)

## Bug fixes

* `components` option should accept arrays.
* Do not convert URLs in Markdown to auto links (#793).
* Improved accessibility (#893 by @gergely-nagy).

---

❤️ Huge thanks to @okonet to help with this release, [CI](#904) and [docs](#905) improvements.️ ❤️
@styleguidist-bot
Copy link
Collaborator

🎉 This PR is included in version 7.0.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants