Update installation.md (#2608) [skip ci]

Co-authored-by: Isiah Meadows <contact@isiahmeadows.com>
This commit is contained in:
Miguel Espinoza 2020-07-12 22:26:56 +02:00 committed by GitHub
parent dca44b14ab
commit ff3e12e5d3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -81,6 +81,15 @@ $ npm start
7. open `index.html` in a browser 7. open `index.html` in a browser
Optionally, you can include Mithril as a global variable using Webpack's provide plugin, to avoid including `import m from "mithril"` across a large number of files:
```js
plugins: [
new webpack.ProvidePlugin({m: "mithril"}),
// ...
]
```
Then, you could remove the import line from step 4 (don't forget to restart Webpack if you ran it with `--watch`), and it will work just the same.
#### Step by step #### Step by step
For production-level projects, the recommended way of installing Mithril is to use npm. For production-level projects, the recommended way of installing Mithril is to use npm.