Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
stipsan authored Dec 19, 2020
1 parent e118c1b commit 1453b1b
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -173,11 +173,11 @@ Importing CSS files is supported via `import "./foo.css"`. By default, generated

```js
// with the default external CSS:
import './foo.css'; // generates a minified .css file in the output directory
import './foo.css'; // generates a minified .css file in the output directory

// with `microbundle --css inline`:
import css from './foo.css';
console.log(css); // the generated minified stylesheet
console.log(css); // the generated minified stylesheet
```

**CSS Modules:** CSS files with names ending in `.module.css` are treated as a [CSS Modules](https://github.com/css-modules/css-modules).
Expand Down Expand Up @@ -235,11 +235,11 @@ It's also possible to configure repeatable short names for each mangled property

The `--define` option can be used to inject or replace build-time constants when bundling. In addition to injecting string or number constants, prefixing the define name with `@` allows injecting JavaScript expressions.

| Build command | Source code | Output |
| -------------------------------------------- | ---------------------- | ----------------------- |
| `microbundle --define VERSION=2` | `console.log(VERSION)` | `console.log(2)` |
| `microbundle --define API_KEY='abc123'` | `console.log(API_KEY)` | `console.log("abc123")` |
| `microbundle --define @assign=Object.assign` | `assign(a, b)` | `Object.assign(a, b)` |
| Build command | Source code | Output |
|---------------|-------------|--------|
`microbundle --define VERSION=2` | `console.log(VERSION)` | `console.log(2)`
`microbundle --define API_KEY='abc123'` | `console.log(API_KEY)` | `console.log("abc123")`
`microbundle --define @assign=Object.assign` | `assign(a, b)` | `Object.assign(a, b)`

### All CLI Options <a name="options"></a>

Expand Down

0 comments on commit 1453b1b

Please sign in to comment.