Skip to content

Commit

Permalink
Upgrade to shakapacker v8
Browse files Browse the repository at this point in the history
  • Loading branch information
Eric-Guo committed Jun 11, 2024
1 parent f8f0951 commit 8f54521
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 17 deletions.
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ gem "sqlite3", "~> 1.4"
# Use the Puma web server [https://github.com/puma/puma]
gem "puma"

gem "shakapacker"
gem "shakapacker", "~> 8.0"

gem "jbuilder"

Expand Down
4 changes: 2 additions & 2 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ GEM
rubyzip (>= 1.2.2, < 3.0)
websocket (~> 1.0)
semantic_range (3.0.0)
shakapacker (7.2.3)
shakapacker (8.0.0)
activesupport (>= 5.2)
package_json
rack-proxy (>= 0.6.1)
Expand Down Expand Up @@ -383,7 +383,7 @@ DEPENDENCIES
rails (~> 7.1.2)
ruby-lsp
selenium-webdriver (>= 4.11.0)
shakapacker
shakapacker (~> 8.0)
sqlite3 (~> 1.4)
standard
tzinfo-data
Expand Down
12 changes: 9 additions & 3 deletions config/webpack/webpack.config.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
const { globalMutableWebpackConfig: webpackConfig, merge } = require('shakapacker')
const { generateWebpackConfig, merge } = require('shakapacker');

const webpackConfig = generateWebpackConfig();

if (!webpackConfig) {
throw new Error('generateWebpackConfig did not return a valid configuration. Check your Shakapacker setup.');
}

// See the shakacode/shakapacker README and docs directory for advice on customizing your webpackConfig.
const customConfig = {
resolve: {
extensions: ['.scss']
}
}
};

module.exports = merge(webpackConfig, customConfig)
module.exports = merge(webpackConfig, customConfig);
5 changes: 2 additions & 3 deletions node_modules/.yarn-integrity

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"sass": "^1.57.1",
"sass-loader": "^13.2.0",
"semver": "^7.5.3",
"shakapacker": "=7.2.3",
"shakapacker": "=8.0.0",
"simplebar": "^6.2.0",
"style-loader": "^3.3.1",
"terser-webpack-plugin": "5",
Expand All @@ -57,5 +57,6 @@
},
"browserslist": [
"defaults"
]
],
"packageManager": "yarn@1.22.22"
}
11 changes: 5 additions & 6 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2477,7 +2477,7 @@ glob-to-regexp@^0.4.1:
resolved "https://registry.npmmirror.com/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz#c75297087c851b9a578bd217dd59a92f59fe546e"
integrity sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw==

glob@^7.1.3, glob@^7.2.0:
glob@^7.1.3:
version "7.2.3"
resolved "https://registry.npmmirror.com/glob/-/glob-7.2.3.tgz#b8df0fb802bbfa8e89bd1d938b4e16578ed44f2b"
integrity sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==
Expand Down Expand Up @@ -3856,12 +3856,11 @@ setprototypeof@1.2.0:
resolved "https://registry.npmmirror.com/setprototypeof/-/setprototypeof-1.2.0.tgz#66c9a24a73f9fc28cbe66b09fed3d33dcaf1b424"
integrity sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==

shakapacker@=7.2.3:
version "7.2.3"
resolved "https://registry.npmmirror.com/shakapacker/-/shakapacker-7.2.3.tgz#12613e8ca3139e47d42003f8d01846dea28f6c40"
integrity sha512-+qF74Y6+hEARqtsmJmBtdc2L0q6eXO21PlPsvtw6aqoxtqhM2VpCCDt51/5Cqnj/5IyEOEICZqStRCSO/q38hg==
shakapacker@=8.0.0:
version "8.0.0"
resolved "https://registry.npmmirror.com/shakapacker/-/shakapacker-8.0.0.tgz#f29537c19078af7318758c92e7a1bca4cee96bdd"
integrity sha512-HCdpITzIKXzGEyUWQhKzPbpwwOsgTamaPH+0kXdhM59VQxZ3NWnT5cL3DlJdAT3sGsWCJskEl3eMkQlnh9DjhA==
dependencies:
glob "^7.2.0"
js-yaml "^4.1.0"
path-complete-extname "^1.0.0"

Expand Down

0 comments on commit 8f54521

Please sign in to comment.