You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is not meant to be a 1:1 replacement of Webpacker.
@@ -25,23 +25,32 @@ gem 'snowpacker'
25
25
26
26
Then run
27
27
28
-
```
28
+
```bash
29
29
bin/rails g snowpacker
30
30
```
31
31
32
32
### Development
33
33
34
-
Currently `snowpacker` is not integrated with `rails s` so you need a process manager like [foreman]() to run both `rails s` and `snowpack`.
34
+
Currently `snowpacker` is not integrated with `rails s` so you need a process manager like [foreman](https://github.com/ddollar/foreman) to run both `rails s` and `snowpack`.
35
35
36
36
Create `Procfile.dev`, with the following content:
37
37
38
38
```bash
39
39
web: bin/rails s
40
-
snowpacker: bin/rails snowpacker:serve
40
+
snowpacker: bin/rails snowpacker:dev
41
41
```
42
42
43
43
Then run `foreman start -f Procfile.dev`
44
44
45
+
Alternatively, you can run:
46
+
47
+
```
48
+
rails server
49
+
rails snowpacker:dev
50
+
```
51
+
52
+
in 2 different terminals.
53
+
45
54
### Production
46
55
47
56
Gem hooks up to the `assets:precompile` and `assets:clobber`, so no special setup is required.
@@ -50,15 +59,19 @@ You can start snowpacker's compilation process manually by running
50
59
51
60
```bash
52
61
rails snowpacker:compile
62
+
63
+
# OR
64
+
65
+
rails snowpacker:build
53
66
```
54
67
55
68
### Including in views
56
69
57
70
Use Rails generic helpers to include assets in your views
0 commit comments