webpacker 6.0.0.beta.6 → 6.0.0.rc.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/jest.yml +7 -15
- data/.github/workflows/js-lint.yml +7 -15
- data/.github/workflows/rubocop.yml +1 -1
- data/.github/workflows/ruby.yml +15 -40
- data/.node-version +1 -1
- data/.rubocop.yml +107 -1
- data/CHANGELOG.md +36 -13
- data/CONTRIBUTING.md +19 -0
- data/Gemfile.lock +105 -104
- data/README.md +183 -170
- data/config/webpacker.yml +1 -1
- data/docs/deployment.md +128 -0
- data/docs/developing_webpacker.md +29 -0
- data/docs/troubleshooting.md +57 -23
- data/docs/v6_upgrade.md +113 -0
- data/gemfiles/Gemfile-rails-edge +1 -1
- data/gemfiles/Gemfile-rails.6.1.x +12 -0
- data/lib/install/{packs/entrypoints/application.js → application.js} +3 -8
- data/lib/install/bin/webpack +4 -7
- data/lib/install/bin/yarn +18 -0
- data/lib/install/config/webpacker.yml +19 -20
- data/lib/install/package.json +15 -0
- data/lib/install/template.rb +48 -19
- data/lib/tasks/webpacker/binstubs.rake +2 -2
- data/lib/tasks/webpacker/check_node.rake +3 -0
- data/lib/tasks/webpacker/check_yarn.rake +4 -1
- data/lib/tasks/webpacker/clobber.rake +1 -1
- data/lib/tasks/webpacker/install.rake +2 -2
- data/lib/tasks/webpacker/verify_config.rake +14 -0
- data/lib/tasks/webpacker/verify_install.rake +1 -11
- data/lib/tasks/yarn.rake +38 -0
- data/lib/webpacker/commands.rb +19 -15
- data/lib/webpacker/configuration.rb +19 -8
- data/lib/webpacker/dev_server.rb +6 -0
- data/lib/webpacker/dev_server_runner.rb +6 -3
- data/lib/webpacker/env.rb +5 -1
- data/lib/webpacker/helper.rb +14 -8
- data/lib/webpacker/instance.rb +4 -0
- data/lib/webpacker/manifest.rb +1 -2
- data/lib/webpacker/railtie.rb +8 -2
- data/lib/webpacker/runner.rb +1 -1
- data/lib/webpacker/version.rb +1 -1
- data/lib/webpacker/webpack_runner.rb +27 -7
- data/lib/webpacker.rb +1 -1
- data/package/__tests__/development.js +4 -11
- data/package/__tests__/env.js +8 -4
- data/package/babel/preset.js +0 -1
- data/package/config.js +3 -3
- data/package/env.js +6 -3
- data/package/environments/__tests__/base.js +3 -3
- data/package/environments/base.js +13 -13
- data/package/environments/development.js +36 -36
- data/package/environments/production.js +1 -1
- data/package/index.js +2 -0
- data/package/inliningCss.js +7 -0
- data/package/rules/file.js +1 -1
- data/package/rules/sass.js +1 -2
- data/package/utils/get_style_rule.js +4 -2
- data/package.json +25 -29
- data/test/command_test.rb +76 -0
- data/test/configuration_test.rb +1 -1
- data/test/dev_server_runner_test.rb +5 -2
- data/test/helper_test.rb +48 -34
- data/test/manifest_test.rb +10 -2
- data/test/mounted_app/test/dummy/config/webpacker.yml +2 -2
- data/test/test_app/config/initializers/inspect_autoload_paths.rb +1 -0
- data/test/test_app/config/webpacker.yml +2 -4
- data/test/test_app/config/webpacker_other_location.yml +79 -0
- data/test/test_app/public/packs/manifest.json +12 -5
- data/test/webpacker_test.rb +21 -0
- data/webpacker.gemspec +2 -2
- data/yarn.lock +2357 -3262
- metadata +24 -12
- data/6_0_upgrade.md +0 -62
data/test/helper_test.rb
CHANGED
@@ -26,18 +26,18 @@ class HelperTest < ActionView::TestCase
|
|
26
26
|
|
27
27
|
def test_image_pack_path
|
28
28
|
assert_equal "/packs/application-k344a6d59eef8632c9d1.png", image_pack_path("application.png")
|
29
|
-
assert_equal "/packs/
|
30
|
-
assert_equal "/packs/
|
31
|
-
assert_equal "/packs/
|
32
|
-
assert_equal "/packs/
|
29
|
+
assert_equal "/packs/static/image-c38deda30895059837cf.jpg", image_pack_path("image.jpg")
|
30
|
+
assert_equal "/packs/static/image-c38deda30895059837cf.jpg", image_pack_path("static/image.jpg")
|
31
|
+
assert_equal "/packs/static/nested/image-c38deda30895059837cf.jpg", image_pack_path("nested/image.jpg")
|
32
|
+
assert_equal "/packs/static/nested/image-c38deda30895059837cf.jpg", image_pack_path("static/nested/image.jpg")
|
33
33
|
end
|
34
34
|
|
35
35
|
def test_image_pack_url
|
36
36
|
assert_equal "https://example.com/packs/application-k344a6d59eef8632c9d1.png", image_pack_url("application.png")
|
37
|
-
assert_equal "https://example.com/packs/
|
38
|
-
assert_equal "https://example.com/packs/
|
39
|
-
assert_equal "https://example.com/packs/
|
40
|
-
assert_equal "https://example.com/packs/
|
37
|
+
assert_equal "https://example.com/packs/static/image-c38deda30895059837cf.jpg", image_pack_url("image.jpg")
|
38
|
+
assert_equal "https://example.com/packs/static/image-c38deda30895059837cf.jpg", image_pack_url("static/image.jpg")
|
39
|
+
assert_equal "https://example.com/packs/static/nested/image-c38deda30895059837cf.jpg", image_pack_url("nested/image.jpg")
|
40
|
+
assert_equal "https://example.com/packs/static/nested/image-c38deda30895059837cf.jpg", image_pack_url("static/nested/image.jpg")
|
41
41
|
end
|
42
42
|
|
43
43
|
def test_image_pack_tag
|
@@ -45,20 +45,20 @@ class HelperTest < ActionView::TestCase
|
|
45
45
|
"<img alt=\"Edit Entry\" src=\"/packs/application-k344a6d59eef8632c9d1.png\" width=\"16\" height=\"10\" />",
|
46
46
|
image_pack_tag("application.png", size: "16x10", alt: "Edit Entry")
|
47
47
|
assert_equal \
|
48
|
-
"<img alt=\"Edit Entry\" src=\"/packs/
|
48
|
+
"<img alt=\"Edit Entry\" src=\"/packs/static/image-c38deda30895059837cf.jpg\" width=\"16\" height=\"10\" />",
|
49
49
|
image_pack_tag("image.jpg", size: "16x10", alt: "Edit Entry")
|
50
50
|
assert_equal \
|
51
|
-
"<img alt=\"Edit Entry\" src=\"/packs/
|
52
|
-
image_pack_tag("
|
51
|
+
"<img alt=\"Edit Entry\" src=\"/packs/static/image-c38deda30895059837cf.jpg\" width=\"16\" height=\"10\" />",
|
52
|
+
image_pack_tag("static/image.jpg", size: "16x10", alt: "Edit Entry")
|
53
53
|
assert_equal \
|
54
|
-
"<img alt=\"Edit Entry\" src=\"/packs/
|
54
|
+
"<img alt=\"Edit Entry\" src=\"/packs/static/nested/image-c38deda30895059837cf.jpg\" width=\"16\" height=\"10\" />",
|
55
55
|
image_pack_tag("nested/image.jpg", size: "16x10", alt: "Edit Entry")
|
56
56
|
assert_equal \
|
57
|
-
"<img alt=\"Edit Entry\" src=\"/packs/
|
58
|
-
image_pack_tag("
|
57
|
+
"<img alt=\"Edit Entry\" src=\"/packs/static/nested/image-c38deda30895059837cf.jpg\" width=\"16\" height=\"10\" />",
|
58
|
+
image_pack_tag("static/nested/image.jpg", size: "16x10", alt: "Edit Entry")
|
59
59
|
assert_equal \
|
60
|
-
"<img srcset=\"/packs/
|
61
|
-
image_pack_tag("
|
60
|
+
"<img srcset=\"/packs/static/image-2x-7cca48e6cae66ec07b8e.jpg 2x\" src=\"/packs/static/image-c38deda30895059837cf.jpg\" />",
|
61
|
+
image_pack_tag("static/image.jpg", srcset: { "static/image-2x.jpg" => "2x" })
|
62
62
|
end
|
63
63
|
|
64
64
|
def test_favicon_pack_tag
|
@@ -66,17 +66,17 @@ class HelperTest < ActionView::TestCase
|
|
66
66
|
"<link rel=\"apple-touch-icon\" type=\"image/png\" href=\"/packs/application-k344a6d59eef8632c9d1.png\" />",
|
67
67
|
favicon_pack_tag("application.png", rel: "apple-touch-icon", type: "image/png")
|
68
68
|
assert_equal \
|
69
|
-
"<link rel=\"apple-touch-icon\" type=\"image/png\" href=\"/packs/
|
69
|
+
"<link rel=\"apple-touch-icon\" type=\"image/png\" href=\"/packs/static/mb-icon-c38deda30895059837cf.png\" />",
|
70
70
|
favicon_pack_tag("mb-icon.png", rel: "apple-touch-icon", type: "image/png")
|
71
71
|
assert_equal \
|
72
|
-
"<link rel=\"apple-touch-icon\" type=\"image/png\" href=\"/packs/
|
73
|
-
favicon_pack_tag("
|
72
|
+
"<link rel=\"apple-touch-icon\" type=\"image/png\" href=\"/packs/static/mb-icon-c38deda30895059837cf.png\" />",
|
73
|
+
favicon_pack_tag("static/mb-icon.png", rel: "apple-touch-icon", type: "image/png")
|
74
74
|
assert_equal \
|
75
|
-
"<link rel=\"apple-touch-icon\" type=\"image/png\" href=\"/packs/
|
75
|
+
"<link rel=\"apple-touch-icon\" type=\"image/png\" href=\"/packs/static/nested/mb-icon-c38deda30895059837cf.png\" />",
|
76
76
|
favicon_pack_tag("nested/mb-icon.png", rel: "apple-touch-icon", type: "image/png")
|
77
77
|
assert_equal \
|
78
|
-
"<link rel=\"apple-touch-icon\" type=\"image/png\" href=\"/packs/
|
79
|
-
favicon_pack_tag("
|
78
|
+
"<link rel=\"apple-touch-icon\" type=\"image/png\" href=\"/packs/static/nested/mb-icon-c38deda30895059837cf.png\" />",
|
79
|
+
favicon_pack_tag("static/nested/mb-icon.png", rel: "apple-touch-icon", type: "image/png")
|
80
80
|
end
|
81
81
|
|
82
82
|
def test_preload_pack_asset
|
@@ -96,12 +96,21 @@ class HelperTest < ActionView::TestCase
|
|
96
96
|
end
|
97
97
|
|
98
98
|
def test_javascript_pack_tag
|
99
|
+
assert_equal \
|
100
|
+
%(<script src="/packs/vendors~application~bootstrap-c20632e7baf2c81200d3.chunk.js" defer="defer"></script>\n) +
|
101
|
+
%(<script src="/packs/vendors~application-e55f2aae30c07fb6d82a.chunk.js" defer="defer"></script>\n) +
|
102
|
+
%(<script src="/packs/application-k344a6d59eef8632c9d1.js" defer="defer"></script>\n) +
|
103
|
+
%(<script src="/packs/bootstrap-300631c4f0e0f9c865bc.js" defer="defer"></script>),
|
104
|
+
javascript_pack_tag("application", "bootstrap")
|
105
|
+
end
|
106
|
+
|
107
|
+
def test_javascript_pack_with_no_defer_tag
|
99
108
|
assert_equal \
|
100
109
|
%(<script src="/packs/vendors~application~bootstrap-c20632e7baf2c81200d3.chunk.js"></script>\n) +
|
101
110
|
%(<script src="/packs/vendors~application-e55f2aae30c07fb6d82a.chunk.js"></script>\n) +
|
102
111
|
%(<script src="/packs/application-k344a6d59eef8632c9d1.js"></script>\n) +
|
103
112
|
%(<script src="/packs/bootstrap-300631c4f0e0f9c865bc.js"></script>),
|
104
|
-
javascript_pack_tag("application", "bootstrap")
|
113
|
+
javascript_pack_tag("application", "bootstrap", defer: false)
|
105
114
|
end
|
106
115
|
|
107
116
|
def test_javascript_pack_tag_splat
|
@@ -114,32 +123,37 @@ class HelperTest < ActionView::TestCase
|
|
114
123
|
|
115
124
|
def test_javascript_pack_tag_symbol
|
116
125
|
assert_equal \
|
117
|
-
%(<script src="/packs/vendors~application~bootstrap-c20632e7baf2c81200d3.chunk.js"></script>\n) +
|
118
|
-
%(<script src="/packs/vendors~application-e55f2aae30c07fb6d82a.chunk.js"></script>\n) +
|
119
|
-
%(<script src="/packs/application-k344a6d59eef8632c9d1.js"></script>),
|
126
|
+
%(<script src="/packs/vendors~application~bootstrap-c20632e7baf2c81200d3.chunk.js" defer="defer"></script>\n) +
|
127
|
+
%(<script src="/packs/vendors~application-e55f2aae30c07fb6d82a.chunk.js" defer="defer"></script>\n) +
|
128
|
+
%(<script src="/packs/application-k344a6d59eef8632c9d1.js" defer="defer"></script>),
|
120
129
|
javascript_pack_tag(:application)
|
121
130
|
end
|
122
131
|
|
132
|
+
def application_stylesheet_chunks
|
133
|
+
%w[/packs/1-c20632e7baf2c81200d3.chunk.css /packs/application-k344a6d59eef8632c9d1.chunk.css]
|
134
|
+
end
|
135
|
+
|
136
|
+
def hello_stimulus_stylesheet_chunks
|
137
|
+
%w[/packs/hello_stimulus-k344a6d59eef8632c9d1.chunk.css]
|
138
|
+
end
|
139
|
+
|
123
140
|
def test_stylesheet_pack_tag
|
124
141
|
assert_equal \
|
125
|
-
|
126
|
-
|
127
|
-
%(<link rel="stylesheet" media="screen" href="/packs/hello_stimulus-k344a6d59eef8632c9d1.chunk.css" />),
|
142
|
+
(application_stylesheet_chunks + hello_stimulus_stylesheet_chunks)
|
143
|
+
.map { |chunk| stylesheet_link_tag(chunk) }.join("\n"),
|
128
144
|
stylesheet_pack_tag("application", "hello_stimulus")
|
129
145
|
end
|
130
146
|
|
131
147
|
def test_stylesheet_pack_tag_symbol
|
132
148
|
assert_equal \
|
133
|
-
|
134
|
-
|
135
|
-
%(<link rel="stylesheet" media="screen" href="/packs/hello_stimulus-k344a6d59eef8632c9d1.chunk.css" />),
|
149
|
+
(application_stylesheet_chunks + hello_stimulus_stylesheet_chunks)
|
150
|
+
.map { |chunk| stylesheet_link_tag(chunk) }.join("\n"),
|
136
151
|
stylesheet_pack_tag(:application, :hello_stimulus)
|
137
152
|
end
|
138
153
|
|
139
154
|
def test_stylesheet_pack_tag_splat
|
140
155
|
assert_equal \
|
141
|
-
|
142
|
-
%(<link rel="stylesheet" media="all" href="/packs/application-k344a6d59eef8632c9d1.chunk.css" />),
|
156
|
+
(application_stylesheet_chunks).map { |chunk| stylesheet_link_tag(chunk, media: "all") }.join("\n"),
|
143
157
|
stylesheet_pack_tag("application", media: "all")
|
144
158
|
end
|
145
159
|
end
|
data/test/manifest_test.rb
CHANGED
@@ -26,11 +26,19 @@ class ManifestTest < Minitest::Test
|
|
26
26
|
end
|
27
27
|
|
28
28
|
def test_lookup_with_chunks_without_extension_success!
|
29
|
-
assert_equal Webpacker.manifest.lookup_pack_with_chunks!("bootstrap", type: :javascript)
|
29
|
+
assert_equal ["/packs/bootstrap-300631c4f0e0f9c865bc.js"], Webpacker.manifest.lookup_pack_with_chunks!("bootstrap", type: :javascript)
|
30
30
|
end
|
31
31
|
|
32
32
|
def test_lookup_with_chunks_with_extension_success!
|
33
|
-
assert_equal Webpacker.manifest.lookup_pack_with_chunks!("bootstrap.js", type: :javascript)
|
33
|
+
assert_equal ["/packs/bootstrap-300631c4f0e0f9c865bc.js"], Webpacker.manifest.lookup_pack_with_chunks!("bootstrap.js", type: :javascript)
|
34
|
+
end
|
35
|
+
|
36
|
+
def test_lookup_with_chunks_without_extension_subdir_success!
|
37
|
+
assert_equal ["/packs/print/application-983b6c164a47f7ed49cd.css"], Webpacker.manifest.lookup_pack_with_chunks!("print/application", type: :css)
|
38
|
+
end
|
39
|
+
|
40
|
+
def test_lookup_with_chunks_with_extension_subdir_success!
|
41
|
+
assert_equal ["/packs/print/application-983b6c164a47f7ed49cd.css"], Webpacker.manifest.lookup_pack_with_chunks!("print/application.css", type: :css)
|
34
42
|
end
|
35
43
|
|
36
44
|
def test_lookup_nil
|
@@ -4,9 +4,9 @@ default: &default
|
|
4
4
|
source_path: app/packs
|
5
5
|
source_entry_path: entrypoints
|
6
6
|
public_output_path: packs
|
7
|
-
cache_path: tmp/
|
7
|
+
cache_path: tmp/webpacker
|
8
8
|
|
9
|
-
# Additional paths webpack should
|
9
|
+
# Additional paths webpack should look up modules
|
10
10
|
# ['app/assets', 'engine/foo/app/assets']
|
11
11
|
additional_paths:
|
12
12
|
- app/assets
|
@@ -0,0 +1 @@
|
|
1
|
+
$test_app_autoload_paths_in_initializer = ActiveSupport::Dependencies.autoload_paths
|
@@ -5,10 +5,10 @@ default: &default
|
|
5
5
|
source_entry_path: entrypoints
|
6
6
|
public_root_path: public
|
7
7
|
public_output_path: packs
|
8
|
-
cache_path: tmp/
|
8
|
+
cache_path: tmp/webpacker
|
9
9
|
webpack_compile_output: false
|
10
10
|
|
11
|
-
# Additional paths webpack should
|
11
|
+
# Additional paths webpack should look up modules
|
12
12
|
# ['app/assets', 'engine/foo/app/assets']
|
13
13
|
additional_paths:
|
14
14
|
- app/assets
|
@@ -43,8 +43,6 @@ development:
|
|
43
43
|
port: 3035
|
44
44
|
public: localhost:3035
|
45
45
|
hmr: false
|
46
|
-
# Inline should be set to true if using HMR
|
47
|
-
inline: true
|
48
46
|
overlay: true
|
49
47
|
disable_host_check: true
|
50
48
|
use_local_ip: false
|
@@ -0,0 +1,79 @@
|
|
1
|
+
# Note: You must restart bin/webpack-dev-server for changes to take effect
|
2
|
+
|
3
|
+
default: &default
|
4
|
+
source_path: app/packs
|
5
|
+
source_entry_path: entrypoints
|
6
|
+
public_root_path: public
|
7
|
+
public_output_path: packs
|
8
|
+
cache_path: tmp/cache/webpacker
|
9
|
+
webpack_compile_output: false
|
10
|
+
|
11
|
+
# Additional paths webpack should look up modules
|
12
|
+
# ['app/assets', 'engine/foo/app/assets']
|
13
|
+
additional_paths:
|
14
|
+
- app/assets
|
15
|
+
- /etc/yarn
|
16
|
+
- some.config.js
|
17
|
+
- app/elm
|
18
|
+
|
19
|
+
# Reload manifest.json on all requests so we reload latest compiled packs
|
20
|
+
cache_manifest: false
|
21
|
+
|
22
|
+
static_assets_extensions:
|
23
|
+
- .jpg
|
24
|
+
- .jpeg
|
25
|
+
- .png
|
26
|
+
- .gif
|
27
|
+
- .tiff
|
28
|
+
- .ico
|
29
|
+
- .svg
|
30
|
+
|
31
|
+
extensions:
|
32
|
+
- .mjs
|
33
|
+
- .js
|
34
|
+
|
35
|
+
development:
|
36
|
+
<<: *default
|
37
|
+
compile: true
|
38
|
+
|
39
|
+
# Reference: https://webpack.js.org/configuration/dev-server/
|
40
|
+
dev_server:
|
41
|
+
https: false
|
42
|
+
host: localhost
|
43
|
+
port: 3035
|
44
|
+
public: localhost:3035
|
45
|
+
hmr: false
|
46
|
+
# Inline should be set to true if using HMR
|
47
|
+
inline: true
|
48
|
+
overlay: true
|
49
|
+
disable_host_check: true
|
50
|
+
use_local_ip: false
|
51
|
+
pretty: false
|
52
|
+
|
53
|
+
test:
|
54
|
+
<<: *default
|
55
|
+
compile: true
|
56
|
+
|
57
|
+
# Compile test packs to a separate directory
|
58
|
+
public_output_path: packs-test
|
59
|
+
|
60
|
+
production:
|
61
|
+
<<: *default
|
62
|
+
|
63
|
+
# Production depends on precompilation of packs prior to booting for performance.
|
64
|
+
compile: false
|
65
|
+
|
66
|
+
# Cache manifest.json for performance
|
67
|
+
cache_manifest: true
|
68
|
+
|
69
|
+
staging:
|
70
|
+
<<: *default
|
71
|
+
|
72
|
+
# Production depends on precompilation of packs prior to booting for performance.
|
73
|
+
compile: false
|
74
|
+
|
75
|
+
# Cache manifest.json for performance
|
76
|
+
cache_manifest: true
|
77
|
+
|
78
|
+
# Compile staging packs to a separate directory
|
79
|
+
public_output_path: packs-staging
|
@@ -5,11 +5,11 @@
|
|
5
5
|
"application.js": "/packs/application-k344a6d59eef8632c9d1.js",
|
6
6
|
"application.png": "/packs/application-k344a6d59eef8632c9d1.png",
|
7
7
|
"fonts/fa-regular-400.woff2": "/packs/fonts/fa-regular-400-944fb546bd7018b07190a32244f67dc9.woff2",
|
8
|
-
"
|
9
|
-
"
|
10
|
-
"
|
11
|
-
"
|
12
|
-
"
|
8
|
+
"static/image.jpg": "/packs/static/image-c38deda30895059837cf.jpg",
|
9
|
+
"static/image-2x.jpg": "/packs/static/image-2x-7cca48e6cae66ec07b8e.jpg",
|
10
|
+
"static/nested/image.jpg": "/packs/static/nested/image-c38deda30895059837cf.jpg",
|
11
|
+
"static/mb-icon.png": "/packs/static/mb-icon-c38deda30895059837cf.png",
|
12
|
+
"static/nested/mb-icon.png": "/packs/static/nested/mb-icon-c38deda30895059837cf.png",
|
13
13
|
"entrypoints": {
|
14
14
|
"application": {
|
15
15
|
"assets": {
|
@@ -38,6 +38,13 @@
|
|
38
38
|
"/packs/hello_stimulus-k344a6d59eef8632c9d1.chunk.css"
|
39
39
|
]
|
40
40
|
}
|
41
|
+
},
|
42
|
+
"print/application": {
|
43
|
+
"assets": {
|
44
|
+
"css": [
|
45
|
+
"/packs/print/application-983b6c164a47f7ed49cd.css"
|
46
|
+
]
|
47
|
+
}
|
41
48
|
}
|
42
49
|
}
|
43
50
|
}
|
data/test/webpacker_test.rb
CHANGED
@@ -10,4 +10,25 @@ class WebpackerTest < Webpacker::Test
|
|
10
10
|
assert_equal "test", Webpacker.config.env
|
11
11
|
end
|
12
12
|
end
|
13
|
+
|
14
|
+
def test_inline_css_no_dev_server
|
15
|
+
assert !Webpacker.inlining_css?
|
16
|
+
end
|
17
|
+
|
18
|
+
def test_inline_css_with_hmr
|
19
|
+
dev_server = Webpacker::DevServer.new({})
|
20
|
+
def dev_server.host; "localhost"; end
|
21
|
+
def dev_server.port; "3035"; end
|
22
|
+
def dev_server.pretty?; false; end
|
23
|
+
def dev_server.https?; true; end
|
24
|
+
def dev_server.hmr?; true; end
|
25
|
+
def dev_server.running?; true; end
|
26
|
+
Webpacker.instance.stub(:dev_server, dev_server) do
|
27
|
+
assert Webpacker.inlining_css?
|
28
|
+
end
|
29
|
+
end
|
30
|
+
|
31
|
+
def test_app_autoload_paths_cleanup
|
32
|
+
assert_empty $test_app_autoload_paths_in_initializer
|
33
|
+
end
|
13
34
|
end
|
data/webpacker.gemspec
CHANGED
@@ -15,7 +15,7 @@ Gem::Specification.new do |s|
|
|
15
15
|
"changelog_uri" => "https://github.com/rails/webpacker/blob/v#{Webpacker::VERSION}/CHANGELOG.md"
|
16
16
|
}
|
17
17
|
|
18
|
-
s.required_ruby_version = ">= 2.
|
18
|
+
s.required_ruby_version = ">= 2.7.0"
|
19
19
|
|
20
20
|
s.add_dependency "activesupport", ">= 5.2"
|
21
21
|
s.add_dependency "railties", ">= 5.2"
|
@@ -23,7 +23,7 @@ Gem::Specification.new do |s|
|
|
23
23
|
s.add_dependency "semantic_range", ">= 2.3.0"
|
24
24
|
|
25
25
|
s.add_development_dependency "bundler", ">= 1.3.0"
|
26
|
-
s.add_development_dependency "rubocop"
|
26
|
+
s.add_development_dependency "rubocop"
|
27
27
|
s.add_development_dependency "rubocop-performance"
|
28
28
|
|
29
29
|
s.files = `git ls-files`.split("\n")
|