Skip to content

Commit

Permalink
fix($readme): small edits to code samples
Browse files Browse the repository at this point in the history
  • Loading branch information
faceyspacey authored Jul 22, 2017
1 parent 0ece5a1 commit 75792ec
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ import('./Foo.js')

↓ ↓ ↓ ↓ ↓ ↓

import { importCss } from 'babel-plugin-dual-import/importCss.js'
import importCss from 'babel-plugin-dual-import/importCss.js'

Promise.all([
import( /* webpackChunkName: 'Foo' */ './Foo'),
Expand All @@ -73,12 +73,12 @@ import(`../base/${page}`)

↓ ↓ ↓ ↓ ↓ ↓

import { importCss } from 'babel-plugin-dual-import/importCss.js'
import importCss from 'babel-plugin-dual-import/importCss.js'

Promise.all([
import( /* webpackChunkName: 'base/[request]' */ `./base/${page}`),
importCss(`base/${page}`)]
).then(promises => promises[0]);
importCss(`base/${page}`)
]).then(promises => promises[0]);
```

It names all your chunks using *"magic comments"* 🔮 behind the scenes and is derived from the imported file. It's *so magic* you don't gotta use "magic comments" anymore. This works with both static and dynamic import paths, as you can see above.
Expand Down

0 comments on commit 75792ec

Please sign in to comment.