Skip to content

Commit 31caac1

Browse files
author
Timothy Johnson
authored
Fixes #11
1 parent d80075d commit 31caac1

File tree

1 file changed

+56
-5
lines changed

1 file changed

+56
-5
lines changed

README.md

Lines changed: 56 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,60 @@ After installing you will see a new tab in Developer Tools. This tab displays a
1212

1313
![1.1.0 Screenshot](https://raw.githubusercontent.com/RedHatter/svelte-devtools/master/screenshot.png "1.1.0 Screenshot")
1414

15-
# Build from source
15+
## Enabling dev mode
1616

17-
## Building
17+
In order for svelte-devtools to comunicate with your application bundle the svelte compiler must have the `dev` option set to `true`.
18+
19+
### Template
20+
By default the [svelte template](https://github.com/sveltejs/template) will set `dev: true` when running `npm run dev` and `false` otherwise.
21+
22+
### Rollup
23+
Below is a minimalist rollup config with `dev: true` set.
24+
```
25+
// rollup.config.js
26+
import * as fs from 'fs';
27+
import svelte from 'rollup-plugin-svelte';
28+
29+
export default {
30+
input: 'src/main.js',
31+
output: {
32+
file: 'public/bundle.js',
33+
format: 'iife'
34+
},
35+
plugins: [
36+
svelte({
37+
dev: true
38+
})
39+
]
40+
}
41+
```
42+
43+
### Webpack
44+
Below is the relvent snipet from a `webpack.config.js` with `dev: true` set.
45+
```
46+
...
47+
module: {
48+
rules: [
49+
...
50+
{
51+
test: /\.(html|svelte)$/,
52+
exclude: /node_modules/,
53+
use: {
54+
loader: 'svelte-loader',
55+
options: {
56+
dev: true,
57+
},
58+
},
59+
},
60+
...
61+
]
62+
},
63+
...
64+
```
65+
66+
## Build from source
67+
68+
### Building
1869

1970
Clone this repository and run the package script.
2071
```
@@ -25,15 +76,15 @@ npm run package
2576
```
2677
This should build the codebase and output a zip file under `web-ext-artifacts`.
2778

28-
## Installing
79+
### Installing
2980

30-
### Firefox
81+
#### Firefox
3182

3283
Unsigned addons can't be install in firefox permanently but addons can be installed temporarily.
3384
1. Navigate to `about:debugging`.
3485
2. Click "Load Temporary Add-on" and choose the generated zip file.
3586

36-
### Chrome
87+
#### Chrome
3788

3889
1. Navigate to `chrome://extensions/`.
3990
2. Turn on developer mode using the 'Developer mode' switch in the upper right hand corner of the page.

0 commit comments

Comments
 (0)