webpacker 6.0.0.beta.2 → 6.0.0.beta.7
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 +1 -1
- data/.github/workflows/js-lint.yml +1 -1
- data/.github/workflows/ruby.yml +9 -6
- data/.rubocop.yml +105 -0
- data/CHANGELOG.md +6 -4
- data/CONTRIBUTING.md +1 -1
- data/Gemfile.lock +93 -90
- data/README.md +133 -58
- data/config/README.md +3 -0
- data/config/webpacker.yml +1 -0
- data/docs/deployment.md +128 -0
- data/docs/troubleshooting.md +160 -0
- data/docs/v6_upgrade.md +86 -0
- data/lib/install/config/webpacker.yml +5 -3
- data/lib/install/{javascript/packs → packs/entrypoints}/application.js +1 -1
- data/lib/install/template.rb +16 -9
- data/lib/tasks/webpacker/binstubs.rake +2 -2
- data/lib/tasks/webpacker/check_node.rake +1 -0
- data/lib/tasks/webpacker/check_yarn.rake +1 -0
- data/lib/tasks/webpacker/install.rake +2 -2
- data/lib/webpacker/commands.rb +2 -1
- data/lib/webpacker/compiler.rb +2 -2
- data/lib/webpacker/configuration.rb +4 -4
- data/lib/webpacker/dev_server_runner.rb +2 -0
- data/lib/webpacker/helper.rb +13 -43
- data/lib/webpacker/manifest.rb +1 -1
- data/lib/webpacker/version.rb +1 -1
- data/lib/webpacker/webpack_runner.rb +1 -0
- data/package.json +1 -1
- data/package/__tests__/development.js +2 -1
- data/package/__tests__/index.js +9 -0
- data/package/environments/__tests__/base.js +4 -4
- data/package/environments/base.js +3 -8
- data/package/environments/development.js +1 -0
- data/package/environments/production.js +1 -1
- data/package/index.js +3 -3
- data/package/rules/babel.js +1 -1
- data/package/rules/stylus.js +1 -1
- data/package/utils/helpers.js +4 -2
- data/test/configuration_test.rb +2 -2
- data/test/dev_server_runner_test.rb +10 -2
- data/test/helper_test.rb +33 -39
- data/test/manifest_test.rb +8 -0
- data/test/mounted_app/test/dummy/config/webpacker.yml +3 -3
- data/test/test_app/app/{javascript/packs → packs/entrypoints}/application.js +1 -1
- data/test/test_app/app/{javascript/packs → packs/entrypoints}/multi_entry.css +0 -0
- data/test/test_app/app/{javascript/packs → packs/entrypoints}/multi_entry.js +0 -0
- data/test/test_app/config/webpacker.yml +3 -3
- data/test/test_app/public/packs/manifest.json +7 -0
- metadata +18 -14
- data/6_0_upgrade.md +0 -43
- data/lib/install/javascript/packs/application.css +0 -9
data/lib/webpacker/helper.rb
CHANGED
@@ -72,27 +72,15 @@ module Webpacker::Helper
|
|
72
72
|
favicon_link_tag(resolve_path_to_image(name), options)
|
73
73
|
end
|
74
74
|
|
75
|
-
# Creates a script tag that references the named pack file, as compiled by webpack per the entries list
|
76
|
-
# in package/environments/base.js. By default, this list is auto-generated to match everything in
|
77
|
-
# app/javascript/packs/*.js. In production mode, the digested reference is automatically looked up.
|
78
|
-
#
|
79
|
-
# Example:
|
80
|
-
#
|
81
|
-
# <%= javascript_pack_tag 'calendar', 'data-turbolinks-track': 'reload' %> # =>
|
82
|
-
# <script src="/packs/calendar-1016838bab065ae1e314.js" data-turbolinks-track="reload"></script>
|
83
|
-
def javascript_pack_tag(*names, **options)
|
84
|
-
javascript_include_tag(*sources_from_manifest_entries(names, type: :javascript), **options)
|
85
|
-
end
|
86
|
-
|
87
75
|
# Creates script tags that reference the js chunks from entrypoints when using split chunks API,
|
88
76
|
# as compiled by webpack per the entries list in package/environments/base.js.
|
89
77
|
# By default, this list is auto-generated to match everything in
|
90
|
-
# app/
|
78
|
+
# app/packs/entrypoints/*.js and all the dependent chunks. In production mode, the digested reference is automatically looked up.
|
91
79
|
# See: https://webpack.js.org/plugins/split-chunks-plugin/
|
92
80
|
#
|
93
81
|
# Example:
|
94
82
|
#
|
95
|
-
# <%=
|
83
|
+
# <%= javascript_pack_tag 'calendar', 'map', 'data-turbolinks-track': 'reload' %> # =>
|
96
84
|
# <script src="/packs/vendor-16838bab065ae1e314.chunk.js" data-turbolinks-track="reload"></script>
|
97
85
|
# <script src="/packs/calendar~runtime-16838bab065ae1e314.chunk.js" data-turbolinks-track="reload"></script>
|
98
86
|
# <script src="/packs/calendar-1016838bab065ae1e314.chunk.js" data-turbolinks-track="reload"></script>
|
@@ -101,13 +89,13 @@ module Webpacker::Helper
|
|
101
89
|
#
|
102
90
|
# DO:
|
103
91
|
#
|
104
|
-
# <%=
|
92
|
+
# <%= javascript_pack_tag 'calendar', 'map' %>
|
105
93
|
#
|
106
94
|
# DON'T:
|
107
95
|
#
|
108
|
-
# <%=
|
109
|
-
# <%=
|
110
|
-
def
|
96
|
+
# <%= javascript_pack_tag 'calendar' %>
|
97
|
+
# <%= javascript_pack_tag 'map' %>
|
98
|
+
def javascript_pack_tag(*names, **options)
|
111
99
|
javascript_include_tag(*sources_from_manifest_entrypoints(names, type: :javascript), **options)
|
112
100
|
end
|
113
101
|
|
@@ -127,53 +115,35 @@ module Webpacker::Helper
|
|
127
115
|
end
|
128
116
|
end
|
129
117
|
|
130
|
-
# Creates a link tag that references the named pack file, as compiled by webpack per the entries list
|
131
|
-
# in package/environments/base.js. By default, this list is auto-generated to match everything in
|
132
|
-
# app/javascript/packs/*.js. In production mode, the digested reference is automatically looked up.
|
133
|
-
#
|
134
|
-
# Note: If the development server is running and hot module replacement is active, this will return nothing.
|
135
|
-
# In that setup you need to configure your styles to be inlined in your JavaScript for hot reloading.
|
136
|
-
#
|
137
|
-
# Examples:
|
138
|
-
#
|
139
|
-
# <%= stylesheet_pack_tag 'calendar', 'data-turbolinks-track': 'reload' %> # =>
|
140
|
-
# <link rel="stylesheet" media="screen" href="/packs/calendar-1016838bab065ae1e122.css" data-turbolinks-track="reload" />
|
141
|
-
def stylesheet_pack_tag(*names, **options)
|
142
|
-
stylesheet_link_tag(*sources_from_manifest_entries(names, type: :stylesheet), **options)
|
143
|
-
end
|
144
|
-
|
145
118
|
# Creates link tags that reference the css chunks from entrypoints when using split chunks API,
|
146
119
|
# as compiled by webpack per the entries list in package/environments/base.js.
|
147
120
|
# By default, this list is auto-generated to match everything in
|
148
|
-
# app/
|
121
|
+
# app/packs/entrypoints/*.js and all the dependent chunks. In production mode, the digested reference is automatically looked up.
|
149
122
|
# See: https://webpack.js.org/plugins/split-chunks-plugin/
|
150
123
|
#
|
151
124
|
# Examples:
|
152
125
|
#
|
153
|
-
# <%=
|
126
|
+
# <%= stylesheet_pack_tag 'calendar', 'map' %> # =>
|
154
127
|
# <link rel="stylesheet" media="screen" href="/packs/3-8c7ce31a.chunk.css" />
|
155
128
|
# <link rel="stylesheet" media="screen" href="/packs/calendar-8c7ce31a.chunk.css" />
|
156
129
|
# <link rel="stylesheet" media="screen" href="/packs/map-8c7ce31a.chunk.css" />
|
157
130
|
#
|
158
131
|
# DO:
|
159
132
|
#
|
160
|
-
# <%=
|
133
|
+
# <%= stylesheet_pack_tag 'calendar', 'map' %>
|
161
134
|
#
|
162
135
|
# DON'T:
|
163
136
|
#
|
164
|
-
# <%=
|
165
|
-
# <%=
|
166
|
-
def
|
137
|
+
# <%= stylesheet_pack_tag 'calendar' %>
|
138
|
+
# <%= stylesheet_pack_tag 'map' %>
|
139
|
+
def stylesheet_pack_tag(*names, **options)
|
167
140
|
stylesheet_link_tag(*sources_from_manifest_entrypoints(names, type: :stylesheet), **options)
|
168
141
|
end
|
169
142
|
|
170
143
|
private
|
171
|
-
def sources_from_manifest_entries(names, type:)
|
172
|
-
names.map { |name| current_webpacker_instance.manifest.lookup!(name, type: type) }.flatten
|
173
|
-
end
|
174
144
|
|
175
145
|
def sources_from_manifest_entrypoints(names, type:)
|
176
|
-
names.map { |name| current_webpacker_instance.manifest.lookup_pack_with_chunks!(name, type: type) }.flatten.uniq
|
146
|
+
names.map { |name| current_webpacker_instance.manifest.lookup_pack_with_chunks!(name.to_s, type: type) }.flatten.uniq
|
177
147
|
end
|
178
148
|
|
179
149
|
def resolve_path_to_image(name, **options)
|
data/lib/webpacker/manifest.rb
CHANGED
@@ -92,7 +92,7 @@ class Webpacker::Manifest
|
|
92
92
|
# When the user provides a name with a file extension, we want to try to strip it off.
|
93
93
|
def manifest_name(name, pack_type)
|
94
94
|
return name if File.extname(name.to_s).empty?
|
95
|
-
File.basename(name, pack_type)
|
95
|
+
File.basename(name, ".#{pack_type}")
|
96
96
|
end
|
97
97
|
|
98
98
|
def manifest_type(pack_type)
|
data/lib/webpacker/version.rb
CHANGED
data/package.json
CHANGED
@@ -0,0 +1,9 @@
|
|
1
|
+
const index = require('../index')
|
2
|
+
|
3
|
+
describe('index', () => {
|
4
|
+
test('exports webpack-merge v5 functions', () => {
|
5
|
+
expect(index.merge).toBeInstanceOf(Function)
|
6
|
+
expect(index.mergeWithRules).toBeInstanceOf(Function)
|
7
|
+
expect(index.mergeWithCustomize).toBeInstanceOf(Function)
|
8
|
+
})
|
9
|
+
})
|
@@ -17,14 +17,14 @@ describe('Base config', () => {
|
|
17
17
|
describe('config', () => {
|
18
18
|
test('should return entry', () => {
|
19
19
|
expect(baseConfig.entry.application).toEqual(
|
20
|
-
resolve('app', '
|
20
|
+
resolve('app', 'packs', 'entrypoints', 'application.js')
|
21
21
|
)
|
22
22
|
})
|
23
23
|
|
24
24
|
test('should return multi file entry points', () => {
|
25
25
|
expect(baseConfig.entry.multi_entry.sort()).toEqual([
|
26
|
-
resolve('app', '
|
27
|
-
resolve('app', '
|
26
|
+
resolve('app', 'packs', 'entrypoints', 'multi_entry.css'),
|
27
|
+
resolve('app', 'packs', 'entrypoints', 'multi_entry.js')
|
28
28
|
])
|
29
29
|
})
|
30
30
|
|
@@ -53,7 +53,7 @@ describe('Base config', () => {
|
|
53
53
|
|
54
54
|
test('should return default resolve.modules with additions', () => {
|
55
55
|
expect(baseConfig.resolve.modules).toEqual([
|
56
|
-
resolve('app', '
|
56
|
+
resolve('app', 'packs'),
|
57
57
|
resolve('app/assets'),
|
58
58
|
resolve('/etc/yarn'),
|
59
59
|
resolve('some.config.js'),
|
@@ -10,7 +10,6 @@ const WebpackAssetsManifest = require('webpack-assets-manifest')
|
|
10
10
|
const webpack = require('webpack')
|
11
11
|
const rules = require('../rules')
|
12
12
|
const config = require('../config')
|
13
|
-
const { isDevelopment } = require('../env')
|
14
13
|
const { moduleExists } = require('../utils/helpers')
|
15
14
|
|
16
15
|
const getEntryObject = () => {
|
@@ -67,12 +66,8 @@ const getPlugins = () => {
|
|
67
66
|
const MiniCssExtractPlugin = require('mini-css-extract-plugin')
|
68
67
|
plugins.push(
|
69
68
|
new MiniCssExtractPlugin({
|
70
|
-
filename:
|
71
|
-
|
72
|
-
: 'css/[name]-[contenthash:8].css',
|
73
|
-
chunkFilename: isDevelopment
|
74
|
-
? 'css/[id].css'
|
75
|
-
: 'css/[id]-[contenthash:8].css'
|
69
|
+
filename: 'css/[name]-[contenthash:8].css',
|
70
|
+
chunkFilename: 'css/[id]-[contenthash:8].css'
|
76
71
|
})
|
77
72
|
)
|
78
73
|
}
|
@@ -91,7 +86,7 @@ module.exports = {
|
|
91
86
|
},
|
92
87
|
entry: getEntryObject(),
|
93
88
|
resolve: {
|
94
|
-
extensions: ['.js', '.mjs', '.ts', '.coffee'],
|
89
|
+
extensions: ['.js', '.jsx', '.mjs', '.ts', '.tsx', '.coffee'],
|
95
90
|
modules: getModulePaths(),
|
96
91
|
plugins: [PnpWebpackPlugin]
|
97
92
|
},
|
@@ -37,7 +37,7 @@ const tryCssMinimizer = () => {
|
|
37
37
|
moduleExists('css-minimizer-webpack-plugin')
|
38
38
|
) {
|
39
39
|
const CssMinimizerPlugin = require('css-minimizer-webpack-plugin')
|
40
|
-
return new CssMinimizerPlugin(
|
40
|
+
return new CssMinimizerPlugin()
|
41
41
|
}
|
42
42
|
|
43
43
|
return null
|
data/package/index.js
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
/* eslint global-require: 0 */
|
2
2
|
/* eslint import/no-dynamic-require: 0 */
|
3
3
|
|
4
|
-
const
|
4
|
+
const webpackMerge = require('webpack-merge')
|
5
5
|
const { resolve } = require('path')
|
6
6
|
const { existsSync } = require('fs')
|
7
7
|
const baseConfig = require('./environments/base')
|
@@ -23,7 +23,7 @@ module.exports = {
|
|
23
23
|
webpackConfig: webpackConfig(),
|
24
24
|
baseConfig,
|
25
25
|
rules,
|
26
|
-
merge,
|
27
26
|
moduleExists,
|
28
|
-
canProcess
|
27
|
+
canProcess,
|
28
|
+
...webpackMerge
|
29
29
|
}
|
data/package/rules/babel.js
CHANGED
@@ -8,7 +8,7 @@ const {
|
|
8
8
|
const { isProduction } = require('../env')
|
9
9
|
|
10
10
|
module.exports = {
|
11
|
-
test: /\.(js|jsx|mjs|ts|tsx)?(\.erb)?$/,
|
11
|
+
test: /\.(js|jsx|mjs|ts|tsx|coffee)?(\.erb)?$/,
|
12
12
|
include: [sourcePath, ...additionalPaths].map((p) => {
|
13
13
|
try {
|
14
14
|
return realpathSync(p)
|
data/package/rules/stylus.js
CHANGED
data/package/utils/helpers.js
CHANGED
@@ -16,7 +16,7 @@ const resetEnv = () => {
|
|
16
16
|
|
17
17
|
const ensureTrailingSlash = (path) => (path.endsWith('/') ? path : `${path}/`)
|
18
18
|
|
19
|
-
const
|
19
|
+
const resolvedPath = (packageName) => {
|
20
20
|
try {
|
21
21
|
return require.resolve(packageName)
|
22
22
|
} catch (e) {
|
@@ -27,8 +27,10 @@ const moduleExists = (packageName) => {
|
|
27
27
|
}
|
28
28
|
}
|
29
29
|
|
30
|
+
const moduleExists = (packageName) => (!!resolvedPath(packageName))
|
31
|
+
|
30
32
|
const canProcess = (rule, fn) => {
|
31
|
-
const modulePath =
|
33
|
+
const modulePath = resolvedPath(rule)
|
32
34
|
|
33
35
|
if (modulePath) {
|
34
36
|
return fn(modulePath)
|
data/test/configuration_test.rb
CHANGED
@@ -10,12 +10,12 @@ class ConfigurationTest < Webpacker::Test
|
|
10
10
|
end
|
11
11
|
|
12
12
|
def test_source_path
|
13
|
-
source_path = File.expand_path File.join(File.dirname(__FILE__), "test_app/app/
|
13
|
+
source_path = File.expand_path File.join(File.dirname(__FILE__), "test_app/app/packs").to_s
|
14
14
|
assert_equal source_path, @config.source_path.to_s
|
15
15
|
end
|
16
16
|
|
17
17
|
def test_source_entry_path
|
18
|
-
source_entry_path = File.expand_path File.join(File.dirname(__FILE__), "test_app/app/
|
18
|
+
source_entry_path = File.expand_path File.join(File.dirname(__FILE__), "test_app/app/packs", "entrypoints").to_s
|
19
19
|
assert_equal @config.source_entry_path.to_s, source_entry_path
|
20
20
|
end
|
21
21
|
|
@@ -43,19 +43,27 @@ class DevServerRunnerTest < Webpacker::Test
|
|
43
43
|
end
|
44
44
|
end
|
45
45
|
|
46
|
+
def test_environment_variables
|
47
|
+
cmd = ["#{test_app_path}/node_modules/.bin/webpack", "serve", "--config", "#{test_app_path}/config/webpack/development.js"]
|
48
|
+
env = Webpacker::Compiler.env.dup
|
49
|
+
env["WEBPACKER_CONFIG"] = "#{test_app_path}/config/webpacker.yml"
|
50
|
+
env["WEBPACK_DEV_SERVER"] = "true"
|
51
|
+
verify_command(cmd, env: env)
|
52
|
+
end
|
53
|
+
|
46
54
|
private
|
47
55
|
def test_app_path
|
48
56
|
File.expand_path("test_app", __dir__)
|
49
57
|
end
|
50
58
|
|
51
|
-
def verify_command(cmd, use_node_modules: true, argv: [])
|
59
|
+
def verify_command(cmd, use_node_modules: true, argv: [], env: Webpacker::Compiler.env)
|
52
60
|
cwd = Dir.pwd
|
53
61
|
Dir.chdir(test_app_path)
|
54
62
|
|
55
63
|
klass = Webpacker::DevServerRunner
|
56
64
|
instance = klass.new(argv)
|
57
65
|
mock = Minitest::Mock.new
|
58
|
-
mock.expect(:call, nil, [
|
66
|
+
mock.expect(:call, nil, [env, *cmd])
|
59
67
|
|
60
68
|
klass.stub(:new, instance) do
|
61
69
|
instance.stub(:node_modules_bin_exist?, use_node_modules) do
|
data/test/helper_test.rb
CHANGED
@@ -79,33 +79,6 @@ class HelperTest < ActionView::TestCase
|
|
79
79
|
favicon_pack_tag("media/images/nested/mb-icon.png", rel: "apple-touch-icon", type: "image/png")
|
80
80
|
end
|
81
81
|
|
82
|
-
def test_javascript_pack_tag
|
83
|
-
assert_equal \
|
84
|
-
%(<script src="/packs/bootstrap-300631c4f0e0f9c865bc.js"></script>),
|
85
|
-
javascript_pack_tag("bootstrap.js")
|
86
|
-
end
|
87
|
-
|
88
|
-
def test_javascript_pack_tag_symbol
|
89
|
-
assert_equal \
|
90
|
-
%(<script src="/packs/bootstrap-300631c4f0e0f9c865bc.js"></script>),
|
91
|
-
javascript_pack_tag(:bootstrap)
|
92
|
-
end
|
93
|
-
|
94
|
-
def test_javascript_pack_tag_splat
|
95
|
-
assert_equal \
|
96
|
-
%(<script src="/packs/bootstrap-300631c4f0e0f9c865bc.js" defer="defer"></script>\n) +
|
97
|
-
%(<script src="/packs/application-k344a6d59eef8632c9d1.js" defer="defer"></script>),
|
98
|
-
javascript_pack_tag("bootstrap.js", "application.js", defer: true)
|
99
|
-
end
|
100
|
-
|
101
|
-
def test_javascript_pack_tag_split_chunks
|
102
|
-
assert_equal \
|
103
|
-
%(<script src="/packs/vendors~application~bootstrap-c20632e7baf2c81200d3.chunk.js"></script>\n) +
|
104
|
-
%(<script src="/packs/vendors~application-e55f2aae30c07fb6d82a.chunk.js"></script>\n) +
|
105
|
-
%(<script src="/packs/application-k344a6d59eef8632c9d1.js"></script>),
|
106
|
-
javascript_packs_with_chunks_tag("application")
|
107
|
-
end
|
108
|
-
|
109
82
|
def test_preload_pack_asset
|
110
83
|
if self.class.method_defined?(:preload_link_tag)
|
111
84
|
assert_equal \
|
@@ -122,30 +95,51 @@ class HelperTest < ActionView::TestCase
|
|
122
95
|
end
|
123
96
|
end
|
124
97
|
|
125
|
-
def
|
98
|
+
def test_javascript_pack_tag
|
126
99
|
assert_equal \
|
127
|
-
%(<
|
128
|
-
%(<
|
129
|
-
%(<
|
130
|
-
|
100
|
+
%(<script src="/packs/vendors~application~bootstrap-c20632e7baf2c81200d3.chunk.js"></script>\n) +
|
101
|
+
%(<script src="/packs/vendors~application-e55f2aae30c07fb6d82a.chunk.js"></script>\n) +
|
102
|
+
%(<script src="/packs/application-k344a6d59eef8632c9d1.js"></script>\n) +
|
103
|
+
%(<script src="/packs/bootstrap-300631c4f0e0f9c865bc.js"></script>),
|
104
|
+
javascript_pack_tag("application", "bootstrap")
|
105
|
+
end
|
106
|
+
|
107
|
+
def test_javascript_pack_tag_splat
|
108
|
+
assert_equal \
|
109
|
+
%(<script src="/packs/vendors~application~bootstrap-c20632e7baf2c81200d3.chunk.js" defer="defer"></script>\n) +
|
110
|
+
%(<script src="/packs/vendors~application-e55f2aae30c07fb6d82a.chunk.js" defer="defer"></script>\n) +
|
111
|
+
%(<script src="/packs/application-k344a6d59eef8632c9d1.js" defer="defer"></script>),
|
112
|
+
javascript_pack_tag("application", defer: true)
|
113
|
+
end
|
114
|
+
|
115
|
+
def test_javascript_pack_tag_symbol
|
116
|
+
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>),
|
120
|
+
javascript_pack_tag(:application)
|
131
121
|
end
|
132
122
|
|
133
123
|
def test_stylesheet_pack_tag
|
134
124
|
assert_equal \
|
135
|
-
%(<link rel="stylesheet" media="screen" href="/packs/
|
136
|
-
|
125
|
+
%(<link rel="stylesheet" media="screen" href="/packs/1-c20632e7baf2c81200d3.chunk.css" />\n) +
|
126
|
+
%(<link rel="stylesheet" media="screen" href="/packs/application-k344a6d59eef8632c9d1.chunk.css" />\n) +
|
127
|
+
%(<link rel="stylesheet" media="screen" href="/packs/hello_stimulus-k344a6d59eef8632c9d1.chunk.css" />),
|
128
|
+
stylesheet_pack_tag("application", "hello_stimulus")
|
137
129
|
end
|
138
130
|
|
139
131
|
def test_stylesheet_pack_tag_symbol
|
140
132
|
assert_equal \
|
141
|
-
%(<link rel="stylesheet" media="screen" href="/packs/
|
142
|
-
|
133
|
+
%(<link rel="stylesheet" media="screen" href="/packs/1-c20632e7baf2c81200d3.chunk.css" />\n) +
|
134
|
+
%(<link rel="stylesheet" media="screen" href="/packs/application-k344a6d59eef8632c9d1.chunk.css" />\n) +
|
135
|
+
%(<link rel="stylesheet" media="screen" href="/packs/hello_stimulus-k344a6d59eef8632c9d1.chunk.css" />),
|
136
|
+
stylesheet_pack_tag(:application, :hello_stimulus)
|
143
137
|
end
|
144
138
|
|
145
139
|
def test_stylesheet_pack_tag_splat
|
146
140
|
assert_equal \
|
147
|
-
%(<link rel="stylesheet" media="all" href="/packs/
|
148
|
-
%(<link rel="stylesheet" media="all" href="/packs/application-
|
149
|
-
stylesheet_pack_tag("
|
141
|
+
%(<link rel="stylesheet" media="all" href="/packs/1-c20632e7baf2c81200d3.chunk.css" />\n) +
|
142
|
+
%(<link rel="stylesheet" media="all" href="/packs/application-k344a6d59eef8632c9d1.chunk.css" />),
|
143
|
+
stylesheet_pack_tag("application", media: "all")
|
150
144
|
end
|
151
145
|
end
|