File tree Expand file tree Collapse file tree 1 file changed +56
-5
lines changed Expand file tree Collapse file tree 1 file changed +56
-5
lines changed Original file line number Diff line number Diff line change @@ -12,9 +12,60 @@ After installing you will see a new tab in Developer Tools. This tab displays a
12
12
13
13
![ 1.1.0 Screenshot] ( https://raw.githubusercontent.com/RedHatter/svelte-devtools/master/screenshot.png " 1.1.0 Screenshot ")
14
14
15
- # Build from source
15
+ ## Enabling dev mode
16
16
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
18
69
19
70
Clone this repository and run the package script.
20
71
```
@@ -25,15 +76,15 @@ npm run package
25
76
```
26
77
This should build the codebase and output a zip file under ` web-ext-artifacts ` .
27
78
28
- ## Installing
79
+ ### Installing
29
80
30
- ### Firefox
81
+ #### Firefox
31
82
32
83
Unsigned addons can't be install in firefox permanently but addons can be installed temporarily.
33
84
1 . Navigate to ` about:debugging ` .
34
85
2 . Click "Load Temporary Add-on" and choose the generated zip file.
35
86
36
- ### Chrome
87
+ #### Chrome
37
88
38
89
1 . Navigate to ` chrome://extensions/ ` .
39
90
2 . Turn on developer mode using the 'Developer mode' switch in the upper right hand corner of the page.
You can’t perform that action at this time.
0 commit comments