webpacker 4.3.0 → 5.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.eslintrc.js +8 -8
- data/.github/workflows/jest.yml +38 -0
- data/.github/workflows/js-lint.yml +39 -0
- data/.github/workflows/rubocop.yml +39 -0
- data/.github/workflows/ruby.yml +66 -0
- data/.node-version +1 -1
- data/.rubocop.yml +113 -13
- data/.travis.yml +8 -22
- data/CHANGELOG.md +52 -2
- data/Gemfile +1 -0
- data/Gemfile.lock +116 -104
- data/README.md +59 -295
- data/docs/css.md +61 -7
- data/docs/deployment.md +2 -2
- data/docs/docker.md +17 -17
- data/docs/engines.md +13 -0
- data/docs/env.md +0 -2
- data/docs/integrations.md +220 -0
- data/docs/target.md +22 -0
- data/docs/testing.md +2 -3
- data/docs/troubleshooting.md +3 -1
- data/docs/typescript.md +92 -28
- data/docs/webpack-dev-server.md +1 -1
- data/lib/install/config/babel.config.js +1 -3
- data/lib/install/config/webpacker.yml +1 -5
- data/lib/install/examples/react/tsconfig.json +2 -1
- data/lib/install/examples/typescript/tsconfig.json +2 -1
- data/lib/install/loaders/svelte.js +2 -2
- data/lib/install/template.rb +10 -2
- data/lib/install/typescript.rb +6 -13
- data/lib/tasks/webpacker/check_node.rake +15 -8
- data/lib/tasks/webpacker/check_yarn.rake +16 -10
- data/lib/tasks/webpacker/clean.rake +12 -6
- data/lib/tasks/webpacker/clobber.rake +8 -4
- data/lib/tasks/webpacker/yarn_install.rake +11 -16
- data/lib/webpacker/commands.rb +33 -9
- data/lib/webpacker/compiler.rb +9 -5
- data/lib/webpacker/configuration.rb +28 -13
- data/lib/webpacker/dev_server_proxy.rb +3 -1
- data/lib/webpacker/dev_server_runner.rb +6 -6
- data/lib/webpacker/env.rb +5 -1
- data/lib/webpacker/helper.rb +37 -18
- data/lib/webpacker/manifest.rb +4 -4
- data/lib/webpacker/railtie.rb +0 -43
- data/lib/webpacker/runner.rb +1 -0
- data/lib/webpacker/version.rb +1 -1
- data/lib/webpacker/webpack_runner.rb +2 -2
- data/package.json +41 -41
- data/package/__tests__/config.js +12 -1
- data/package/__tests__/dev_server.js +2 -0
- data/package/__tests__/development.js +14 -1
- data/package/config.js +4 -1
- data/package/configPath.js +3 -0
- data/package/dev_server.js +1 -1
- data/package/env.js +1 -2
- data/package/environments/__tests__/base.js +29 -2
- data/package/environments/base.js +17 -7
- data/package/environments/development.js +39 -37
- data/package/environments/production.js +1 -3
- data/package/rules/babel.js +12 -5
- data/package/rules/file.js +3 -2
- data/package/rules/node_modules.js +1 -3
- data/package/rules/sass.js +10 -1
- data/package/utils/helpers.js +1 -1
- data/test/compiler_test.rb +8 -3
- data/test/configuration_test.rb +8 -7
- data/test/dev_server_runner_test.rb +1 -1
- data/test/helper_test.rb +3 -0
- data/test/manifest_test.rb +37 -6
- data/test/rake_tasks_test.rb +11 -0
- data/test/test_app/app/javascript/packs/multi_entry.css +4 -0
- data/test/test_app/app/javascript/packs/multi_entry.js +4 -0
- data/test/test_app/config/application.rb +0 -1
- data/test/test_app/config/webpacker.yml +7 -1
- data/test/test_app/public/packs/manifest.json +1 -0
- data/test/webpack_runner_test.rb +1 -1
- data/webpacker.gemspec +5 -4
- data/yarn.lock +4237 -3407
- metadata +43 -22
- data/gemfiles/Gemfile-rails.4.2.x +0 -9
- data/gemfiles/Gemfile-rails.5.0.x +0 -9
- data/gemfiles/Gemfile-rails.5.1.x +0 -9
- data/lib/install/loaders/typescript.js +0 -11
@@ -7,45 +7,47 @@ module.exports = class extends Base {
|
|
7
7
|
constructor() {
|
8
8
|
super()
|
9
9
|
|
10
|
-
if (devServer.hmr) {
|
11
|
-
this.plugins.append('HotModuleReplacement', new webpack.HotModuleReplacementPlugin())
|
12
|
-
this.config.output.filename = '[name]-[hash].js'
|
13
|
-
}
|
14
|
-
|
15
10
|
this.config.merge({
|
16
11
|
mode: 'development',
|
17
|
-
|
18
|
-
devtool: 'cheap-module-source-map',
|
19
|
-
output: {
|
20
|
-
pathinfo: true
|
21
|
-
},
|
22
|
-
devServer: {
|
23
|
-
clientLogLevel: 'none',
|
24
|
-
compress: devServer.compress,
|
25
|
-
quiet: devServer.quiet,
|
26
|
-
disableHostCheck: devServer.disable_host_check,
|
27
|
-
host: devServer.host,
|
28
|
-
port: devServer.port,
|
29
|
-
https: devServer.https,
|
30
|
-
hot: devServer.hmr,
|
31
|
-
contentBase,
|
32
|
-
inline: devServer.inline,
|
33
|
-
useLocalIp: devServer.use_local_ip,
|
34
|
-
public: devServer.public,
|
35
|
-
publicPath,
|
36
|
-
historyApiFallback: {
|
37
|
-
disableDotRule: true
|
38
|
-
},
|
39
|
-
headers: devServer.headers,
|
40
|
-
overlay: devServer.overlay,
|
41
|
-
stats: {
|
42
|
-
entrypoints: false,
|
43
|
-
errorDetails: true,
|
44
|
-
modules: false,
|
45
|
-
moduleTrace: false
|
46
|
-
},
|
47
|
-
watchOptions: devServer.watch_options
|
48
|
-
}
|
12
|
+
devtool: 'cheap-module-source-map'
|
49
13
|
})
|
14
|
+
|
15
|
+
if (process.env.WEBPACK_DEV_SERVER
|
16
|
+
&& process.env.WEBPACK_DEV_SERVER !== 'undefined') {
|
17
|
+
if (devServer.hmr) {
|
18
|
+
this.plugins.append('HotModuleReplacement', new webpack.HotModuleReplacementPlugin())
|
19
|
+
this.config.output.filename = '[name]-[hash].js'
|
20
|
+
}
|
21
|
+
|
22
|
+
this.config.merge({
|
23
|
+
devServer: {
|
24
|
+
clientLogLevel: 'none',
|
25
|
+
compress: devServer.compress,
|
26
|
+
quiet: devServer.quiet,
|
27
|
+
disableHostCheck: devServer.disable_host_check,
|
28
|
+
host: devServer.host,
|
29
|
+
port: devServer.port,
|
30
|
+
https: devServer.https,
|
31
|
+
hot: devServer.hmr,
|
32
|
+
contentBase,
|
33
|
+
inline: devServer.inline,
|
34
|
+
useLocalIp: devServer.use_local_ip,
|
35
|
+
public: devServer.public,
|
36
|
+
publicPath,
|
37
|
+
historyApiFallback: {
|
38
|
+
disableDotRule: true
|
39
|
+
},
|
40
|
+
headers: devServer.headers,
|
41
|
+
overlay: devServer.overlay,
|
42
|
+
stats: {
|
43
|
+
entrypoints: false,
|
44
|
+
errorDetails: true,
|
45
|
+
modules: false,
|
46
|
+
moduleTrace: false
|
47
|
+
},
|
48
|
+
watchOptions: devServer.watch_options
|
49
|
+
}
|
50
|
+
})
|
51
|
+
}
|
50
52
|
}
|
51
53
|
}
|
@@ -13,7 +13,6 @@ module.exports = class extends Base {
|
|
13
13
|
new CompressionPlugin({
|
14
14
|
filename: '[path].gz[query]',
|
15
15
|
algorithm: 'gzip',
|
16
|
-
cache: true,
|
17
16
|
test: /\.(js|css|html|json|ico|svg|eot|otf|ttf|map)$/
|
18
17
|
})
|
19
18
|
)
|
@@ -24,7 +23,6 @@ module.exports = class extends Base {
|
|
24
23
|
new CompressionPlugin({
|
25
24
|
filename: '[path].br[query]',
|
26
25
|
algorithm: 'brotliCompress',
|
27
|
-
cache: true,
|
28
26
|
test: /\.(js|css|html|json|ico|svg|eot|otf|ttf|map)$/
|
29
27
|
})
|
30
28
|
)
|
@@ -48,7 +46,7 @@ module.exports = class extends Base {
|
|
48
46
|
optimization: {
|
49
47
|
minimizer: [
|
50
48
|
new TerserPlugin({
|
51
|
-
parallel: true,
|
49
|
+
parallel: Number.parseInt(process.env.WEBPACKER_PARALLEL, 10) || true,
|
52
50
|
cache: true,
|
53
51
|
sourceMap: true,
|
54
52
|
terserOptions: {
|
data/package/rules/babel.js
CHANGED
@@ -1,18 +1,25 @@
|
|
1
|
-
const {
|
2
|
-
const {
|
1
|
+
const { resolve } = require('path')
|
2
|
+
const { realpathSync } = require('fs')
|
3
|
+
const { source_path: sourcePath, additional_paths: additionalPaths } = require('../config')
|
3
4
|
const { nodeEnv } = require('../env')
|
4
5
|
|
5
6
|
// Process application Javascript code with Babel.
|
6
7
|
// Uses application .babelrc to apply any transformations
|
7
8
|
module.exports = {
|
8
|
-
test: /\.(js|jsx|mjs)?(\.erb)?$/,
|
9
|
-
include: [sourcePath, ...
|
9
|
+
test: /\.(js|jsx|mjs|ts|tsx)?(\.erb)?$/,
|
10
|
+
include: [sourcePath, ...additionalPaths].map((p) => {
|
11
|
+
try {
|
12
|
+
return realpathSync(p)
|
13
|
+
} catch (e) {
|
14
|
+
return resolve(p)
|
15
|
+
}
|
16
|
+
}),
|
10
17
|
exclude: /node_modules/,
|
11
18
|
use: [
|
12
19
|
{
|
13
20
|
loader: 'babel-loader',
|
14
21
|
options: {
|
15
|
-
cacheDirectory:
|
22
|
+
cacheDirectory: true,
|
16
23
|
cacheCompression: nodeEnv === 'production',
|
17
24
|
compact: nodeEnv === 'production'
|
18
25
|
}
|
data/package/rules/file.js
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
const { join } = require('path')
|
1
|
+
const { join, normalize } = require('path')
|
2
2
|
const { source_path: sourcePath, static_assets_extensions: fileExtensions } = require('../config')
|
3
3
|
|
4
4
|
module.exports = {
|
@@ -8,11 +8,12 @@ module.exports = {
|
|
8
8
|
loader: 'file-loader',
|
9
9
|
options: {
|
10
10
|
name(file) {
|
11
|
-
if (file.includes(sourcePath)) {
|
11
|
+
if (file.includes(normalize(sourcePath))) {
|
12
12
|
return 'media/[path][name]-[hash].[ext]'
|
13
13
|
}
|
14
14
|
return 'media/[folder]/[name]-[hash:8].[ext]'
|
15
15
|
},
|
16
|
+
esModule: false,
|
16
17
|
context: join(sourcePath)
|
17
18
|
}
|
18
19
|
}
|
@@ -1,5 +1,3 @@
|
|
1
|
-
const { join } = require('path')
|
2
|
-
const { cache_path: cachePath } = require('../config')
|
3
1
|
const { nodeEnv } = require('../env')
|
4
2
|
|
5
3
|
// Compile standard ES features for JS in node_modules with Babel.
|
@@ -14,7 +12,7 @@ module.exports = {
|
|
14
12
|
options: {
|
15
13
|
babelrc: false,
|
16
14
|
presets: [['@babel/preset-env', { modules: false }]],
|
17
|
-
cacheDirectory:
|
15
|
+
cacheDirectory: true,
|
18
16
|
cacheCompression: nodeEnv === 'production',
|
19
17
|
compact: false,
|
20
18
|
sourceMaps: false
|
data/package/rules/sass.js
CHANGED
@@ -1,8 +1,17 @@
|
|
1
|
+
/* eslint global-require: 0 */
|
2
|
+
|
1
3
|
const getStyleRule = require('../utils/get_style_rule')
|
4
|
+
const { additional_paths: includePaths } = require('../config')
|
2
5
|
|
3
6
|
module.exports = getStyleRule(/\.(scss|sass)(\.erb)?$/i, false, [
|
4
7
|
{
|
5
8
|
loader: 'sass-loader',
|
6
|
-
options: {
|
9
|
+
options: {
|
10
|
+
sourceMap: true,
|
11
|
+
implementation: require('sass'),
|
12
|
+
sassOptions: {
|
13
|
+
includePaths
|
14
|
+
}
|
15
|
+
}
|
7
16
|
}
|
8
17
|
])
|
data/package/utils/helpers.js
CHANGED
data/test/compiler_test.rb
CHANGED
@@ -25,9 +25,10 @@ class CompilerTest < Minitest::Test
|
|
25
25
|
|
26
26
|
def test_default_watched_paths
|
27
27
|
assert_equal Webpacker.compiler.send(:default_watched_paths), [
|
28
|
-
"app/assets/**/*{.mjs,.js,.sass,.scss,.css,.module.sass,.module.scss,.module.css,.png,.svg,.gif,.jpeg,.jpg}",
|
29
|
-
"/etc/yarn/**/*{.mjs,.js,.sass,.scss,.css,.module.sass,.module.scss,.module.css,.png,.svg,.gif,.jpeg,.jpg}",
|
30
|
-
"app/
|
28
|
+
"app/assets/**/*{.mjs,.js,.sass,.scss,.css,.module.sass,.module.scss,.module.css,.png,.svg,.gif,.jpeg,.jpg,.elm}",
|
29
|
+
"/etc/yarn/**/*{.mjs,.js,.sass,.scss,.css,.module.sass,.module.scss,.module.css,.png,.svg,.gif,.jpeg,.jpg,.elm}",
|
30
|
+
"app/elm/**/*{.mjs,.js,.sass,.scss,.css,.module.sass,.module.scss,.module.css,.png,.svg,.gif,.jpeg,.jpg,.elm}",
|
31
|
+
"app/javascript/**/*{.mjs,.js,.sass,.scss,.css,.module.sass,.module.scss,.module.css,.png,.svg,.gif,.jpeg,.jpg,.elm}",
|
31
32
|
"yarn.lock",
|
32
33
|
"package.json",
|
33
34
|
"config/webpack/**/*"
|
@@ -39,6 +40,10 @@ class CompilerTest < Minitest::Test
|
|
39
40
|
assert !Webpacker.compiler.fresh?
|
40
41
|
end
|
41
42
|
|
43
|
+
def test_compile
|
44
|
+
assert !Webpacker.compiler.compile
|
45
|
+
end
|
46
|
+
|
42
47
|
def test_freshness_on_compile_success
|
43
48
|
status = OpenStruct.new(success?: true)
|
44
49
|
|
data/test/configuration_test.rb
CHANGED
@@ -16,7 +16,7 @@ class ConfigurationTest < Webpacker::Test
|
|
16
16
|
|
17
17
|
def test_source_path_globbed
|
18
18
|
assert_equal @config.source_path_globbed,
|
19
|
-
"app/javascript/**/*{.mjs,.js,.sass,.scss,.css,.module.sass,.module.scss,.module.css,.png,.svg,.gif,.jpeg,.jpg}"
|
19
|
+
"app/javascript/**/*{.mjs,.js,.sass,.scss,.css,.module.sass,.module.scss,.module.css,.png,.svg,.gif,.jpeg,.jpg,.elm}"
|
20
20
|
end
|
21
21
|
|
22
22
|
def test_source_entry_path
|
@@ -53,14 +53,15 @@ class ConfigurationTest < Webpacker::Test
|
|
53
53
|
assert_equal @config.cache_path.to_s, cache_path
|
54
54
|
end
|
55
55
|
|
56
|
-
def
|
57
|
-
assert_equal @config.
|
56
|
+
def test_additional_paths
|
57
|
+
assert_equal @config.additional_paths, ["app/assets", "/etc/yarn", "app/elm"]
|
58
58
|
end
|
59
59
|
|
60
|
-
def
|
61
|
-
assert_equal @config.
|
62
|
-
"app/assets/**/*{.mjs,.js,.sass,.scss,.css,.module.sass,.module.scss,.module.css,.png,.svg,.gif,.jpeg,.jpg}",
|
63
|
-
"/etc/yarn/**/*{.mjs,.js,.sass,.scss,.css,.module.sass,.module.scss,.module.css,.png,.svg,.gif,.jpeg,.jpg}"
|
60
|
+
def test_additional_paths_globbed
|
61
|
+
assert_equal @config.additional_paths_globbed, [
|
62
|
+
"app/assets/**/*{.mjs,.js,.sass,.scss,.css,.module.sass,.module.scss,.module.css,.png,.svg,.gif,.jpeg,.jpg,.elm}",
|
63
|
+
"/etc/yarn/**/*{.mjs,.js,.sass,.scss,.css,.module.sass,.module.scss,.module.css,.png,.svg,.gif,.jpeg,.jpg,.elm}",
|
64
|
+
"app/elm/**/*{.mjs,.js,.sass,.scss,.css,.module.sass,.module.scss,.module.css,.png,.svg,.gif,.jpeg,.jpg,.elm}"
|
64
65
|
]
|
65
66
|
end
|
66
67
|
|
@@ -36,7 +36,7 @@ class DevServerRunnerTest < Webpacker::Test
|
|
36
36
|
klass = Webpacker::DevServerRunner
|
37
37
|
instance = klass.new([])
|
38
38
|
mock = Minitest::Mock.new
|
39
|
-
mock.expect(:call, nil, [
|
39
|
+
mock.expect(:call, nil, [Webpacker::Compiler.env, *cmd])
|
40
40
|
|
41
41
|
klass.stub(:new, instance) do
|
42
42
|
instance.stub(:node_modules_bin_exist?, use_node_modules) do
|
data/test/helper_test.rb
CHANGED
@@ -50,6 +50,9 @@ class HelperTest < ActionView::TestCase
|
|
50
50
|
assert_equal \
|
51
51
|
"<img alt=\"Edit Entry\" src=\"/packs/media/images/nested/image-c38deda30895059837cf.jpg\" width=\"16\" height=\"10\" />",
|
52
52
|
image_pack_tag("media/images/nested/image.jpg", size: "16x10", alt: "Edit Entry")
|
53
|
+
assert_equal \
|
54
|
+
"<img srcset=\"/packs/media/images/image-2x-7cca48e6cae66ec07b8e.jpg 2x\" src=\"/packs/media/images/image-c38deda30895059837cf.jpg\" />",
|
55
|
+
image_pack_tag("media/images/image.jpg", srcset: { "media/images/image-2x.jpg" => "2x" })
|
53
56
|
end
|
54
57
|
|
55
58
|
def test_favicon_pack_tag
|
data/test/manifest_test.rb
CHANGED
@@ -2,16 +2,23 @@ require "test_helper"
|
|
2
2
|
|
3
3
|
class ManifestTest < Minitest::Test
|
4
4
|
def test_lookup_exception!
|
5
|
-
manifest_path = File.expand_path File.join(File.dirname(__FILE__), "test_app/public/packs", "manifest.json").to_s
|
6
5
|
asset_file = "calendar.js"
|
7
6
|
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
7
|
+
error = assert_raises_manifest_missing_entry_error do
|
8
|
+
Webpacker.manifest.lookup!(asset_file)
|
9
|
+
end
|
10
|
+
|
11
|
+
assert_match "Webpacker can't find #{asset_file} in #{manifest_path}", error.message
|
12
|
+
end
|
13
|
+
|
14
|
+
def test_lookup_with_type_exception!
|
15
|
+
asset_file = "calendar"
|
12
16
|
|
13
|
-
|
17
|
+
error = assert_raises_manifest_missing_entry_error do
|
18
|
+
Webpacker.manifest.lookup!(asset_file, type: :javascript)
|
14
19
|
end
|
20
|
+
|
21
|
+
assert_match "Webpacker can't find #{asset_file}.js in #{manifest_path}", error.message
|
15
22
|
end
|
16
23
|
|
17
24
|
def test_lookup_success!
|
@@ -30,6 +37,16 @@ class ManifestTest < Minitest::Test
|
|
30
37
|
assert_equal Webpacker.manifest.lookup("bootstrap.js"), "/packs/bootstrap-300631c4f0e0f9c865bc.js"
|
31
38
|
end
|
32
39
|
|
40
|
+
def test_lookup_entrypoint_exception!
|
41
|
+
asset_file = "calendar"
|
42
|
+
|
43
|
+
error = assert_raises_manifest_missing_entry_error do
|
44
|
+
Webpacker.manifest.lookup_pack_with_chunks!(asset_file, type: :javascript)
|
45
|
+
end
|
46
|
+
|
47
|
+
assert_match "Webpacker can't find #{asset_file}.js in #{manifest_path}", error.message
|
48
|
+
end
|
49
|
+
|
33
50
|
def test_lookup_entrypoint
|
34
51
|
application_entrypoints = [
|
35
52
|
"/packs/vendors~application~bootstrap-c20632e7baf2c81200d3.chunk.js",
|
@@ -39,4 +56,18 @@ class ManifestTest < Minitest::Test
|
|
39
56
|
|
40
57
|
assert_equal Webpacker.manifest.lookup_pack_with_chunks!("application", type: :javascript), application_entrypoints
|
41
58
|
end
|
59
|
+
|
60
|
+
private
|
61
|
+
|
62
|
+
def assert_raises_manifest_missing_entry_error(&block)
|
63
|
+
error = nil
|
64
|
+
Webpacker.config.stub :compile?, false do
|
65
|
+
error = assert_raises Webpacker::Manifest::MissingEntryError, &block
|
66
|
+
end
|
67
|
+
error
|
68
|
+
end
|
69
|
+
|
70
|
+
def manifest_path
|
71
|
+
File.expand_path File.join(File.dirname(__FILE__), "test_app/public/packs", "manifest.json").to_s
|
72
|
+
end
|
42
73
|
end
|
data/test/rake_tasks_test.rb
CHANGED
@@ -28,6 +28,17 @@ class RakeTasksTest < Minitest::Test
|
|
28
28
|
refute_includes output, "webpack binstubs not found."
|
29
29
|
end
|
30
30
|
|
31
|
+
def test_check_node_version
|
32
|
+
output = Dir.chdir(test_app_path) { `rake webpacker:check_node 2>&1` }
|
33
|
+
refute_includes output, "Webpacker requires Node.js"
|
34
|
+
end
|
35
|
+
|
36
|
+
def test_check_yarn_version
|
37
|
+
output = Dir.chdir(test_app_path) { `rake webpacker:check_yarn 2>&1` }
|
38
|
+
refute_includes output, "Yarn not installed"
|
39
|
+
refute_includes output, "Webpacker requires Yarn"
|
40
|
+
end
|
41
|
+
|
31
42
|
def test_rake_webpacker_yarn_install_in_non_production_environments
|
32
43
|
assert_includes test_app_dev_dependencies, "right-pad"
|
33
44
|
|
@@ -10,10 +10,15 @@ default: &default
|
|
10
10
|
|
11
11
|
# Additional paths webpack should lookup modules
|
12
12
|
# ['app/assets', 'engine/foo/app/assets']
|
13
|
-
|
13
|
+
additional_paths:
|
14
14
|
- app/assets
|
15
15
|
- /etc/yarn
|
16
16
|
|
17
|
+
# This configuration option is deprecated and is only here for testing, to
|
18
|
+
# ensure backwards-compatibility. Please use `additional_paths`.
|
19
|
+
resolved_paths:
|
20
|
+
- app/elm
|
21
|
+
|
17
22
|
# Reload manifest.json on all requests so we reload latest compiled packs
|
18
23
|
cache_manifest: false
|
19
24
|
|
@@ -43,6 +48,7 @@ default: &default
|
|
43
48
|
- .gif
|
44
49
|
- .jpeg
|
45
50
|
- .jpg
|
51
|
+
- .elm
|
46
52
|
|
47
53
|
development:
|
48
54
|
<<: *default
|
@@ -6,6 +6,7 @@
|
|
6
6
|
"application.png": "/packs/application-k344a6d59eef8632c9d1.png",
|
7
7
|
"fonts/fa-regular-400.woff2": "/packs/fonts/fa-regular-400-944fb546bd7018b07190a32244f67dc9.woff2",
|
8
8
|
"media/images/image.jpg": "/packs/media/images/image-c38deda30895059837cf.jpg",
|
9
|
+
"media/images/image-2x.jpg": "/packs/media/images/image-2x-7cca48e6cae66ec07b8e.jpg",
|
9
10
|
"media/images/nested/image.jpg": "/packs/media/images/nested/image-c38deda30895059837cf.jpg",
|
10
11
|
"media/images/mb-icon.png": "/packs/media/images/mb-icon-c38deda30895059837cf.png",
|
11
12
|
"media/images/nested/mb-icon.png": "/packs/media/images/nested/mb-icon-c38deda30895059837cf.png",
|
data/test/webpack_runner_test.rb
CHANGED
@@ -36,7 +36,7 @@ class WebpackRunnerTest < Webpacker::Test
|
|
36
36
|
klass = Webpacker::WebpackRunner
|
37
37
|
instance = klass.new([])
|
38
38
|
mock = Minitest::Mock.new
|
39
|
-
mock.expect(:call, nil, [
|
39
|
+
mock.expect(:call, nil, [Webpacker::Compiler.env, *cmd])
|
40
40
|
|
41
41
|
klass.stub(:new, instance) do
|
42
42
|
instance.stub(:node_modules_bin_exist?, use_node_modules) do
|
data/webpacker.gemspec
CHANGED
@@ -15,14 +15,15 @@ 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.4.0"
|
19
19
|
|
20
|
-
s.add_dependency "activesupport", ">=
|
21
|
-
s.add_dependency "railties", ">=
|
20
|
+
s.add_dependency "activesupport", ">= 5.2"
|
21
|
+
s.add_dependency "railties", ">= 5.2"
|
22
22
|
s.add_dependency "rack-proxy", ">= 0.6.1"
|
23
|
+
s.add_dependency "semantic_range", ">= 2.3.0"
|
23
24
|
|
24
25
|
s.add_development_dependency "bundler", ">= 1.3.0"
|
25
|
-
s.add_development_dependency "rubocop", "
|
26
|
+
s.add_development_dependency "rubocop", "0.93.1"
|
26
27
|
s.add_development_dependency "rubocop-performance"
|
27
28
|
|
28
29
|
s.files = `git ls-files`.split("\n")
|