-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Eject webpacker for jsbundling-rails
- Loading branch information
1 parent
312e074
commit 28dd9f8
Showing
21 changed files
with
1,763 additions
and
910 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -47,3 +47,6 @@ package-lock.json | |
|
||
# Ignore asdf versions | ||
.tool-versions | ||
|
||
/app/assets/builds/* | ||
!/app/assets/builds/.keep |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
web: env RUBY_DEBUG_OPEN=true bin/rails server | ||
js: yarn build --watch |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
//= link_tree ../images | ||
//= link_directory ../stylesheets .css | ||
//= link_tree ../builds |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
// Entry point for the build script in your package.json | ||
import Index from "./packs/Index.tsx"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#!/usr/bin/env sh | ||
|
||
if gem list --no-installed --exact --silent foreman; then | ||
echo "Installing foreman..." | ||
gem install foreman | ||
fi | ||
|
||
# Default to port 3000 if not specified | ||
export PORT="${PORT:-3000}" | ||
|
||
exec foreman start -f Procfile.dev --env /dev/null "$@" |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
const path = require("path") | ||
const webpack = require("webpack") | ||
const MiniCssExtractPlugin = require('mini-css-extract-plugin'); | ||
|
||
module.exports = { | ||
mode: "production", | ||
devtool: "source-map", | ||
entry: { | ||
application: [ | ||
"./app/javascript/application.js", | ||
'./app/assets/stylesheets/application.css', | ||
], | ||
}, | ||
output: { | ||
filename: "[name].js", | ||
chunkFilename: "[name]-[contenthash].digested.js", | ||
sourceMapFilename: "[file]-[fullhash].map", | ||
path: path.resolve(__dirname, '..', '..', 'app/assets/builds'), | ||
hashFunction: "sha256", | ||
hashDigestLength: 64, | ||
}, | ||
module: { | ||
rules: [ | ||
{ | ||
test: /\.(js|jsx|ts|tsx|)$/, | ||
exclude: /node_modules/, | ||
use: ['babel-loader'], | ||
}, | ||
{ | ||
test: /\.(?:sa|sc|c)ss$/i, | ||
use: [MiniCssExtractPlugin.loader, 'css-loader', 'sass-loader'], | ||
}, | ||
{ | ||
test: /\.(png|jpe?g|gif|eot|woff2|woff|ttf|svg)$/i, | ||
use: 'file-loader', | ||
}, | ||
], | ||
}, | ||
resolve: { | ||
extensions: ['.js', '.jsx', '.ts', '.tsx', '.scss', '.css', '.png', '.svg'], | ||
}, | ||
plugins: [ | ||
new MiniCssExtractPlugin(), | ||
new webpack.optimize.LimitChunkCountPlugin({ | ||
maxChunks: 1 | ||
}), | ||
new webpack.EnvironmentPlugin({ | ||
CNB_API_HOST: 'https://cnb-registry-api.herokuapp.com' | ||
}) | ||
] | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,16 +3,22 @@ | |
"version": "0.0.1", | ||
"private": true, | ||
"engines": { | ||
"node": "14.x" | ||
"node": "20.x" | ||
}, | ||
"scripts": { | ||
"start": "node ./bin/www", | ||
"index": "node ./bin/indexer" | ||
"index": "node ./bin/indexer", | ||
"build": "NODE_OPTIONS=--openssl-legacy-provider webpack --config ./config/webpack/webpack.config.js" | ||
}, | ||
"packageManager": "[email protected]+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e", | ||
"dependencies": { | ||
"@babel/core": "^7.25.2", | ||
"@babel/plugin-proposal-class-properties": "^7.18.6", | ||
"@babel/plugin-proposal-object-rest-spread": "^7.20.7", | ||
"@babel/plugin-transform-runtime": "^7.24.7", | ||
"@babel/preset-env": "^7.25.3", | ||
"@babel/preset-react": "^7.12.10", | ||
"@babel/preset-typescript": "^7.12.7", | ||
"@rails/webpacker": "5.2.1", | ||
"@testing-library/jest-dom": "^5.11.4", | ||
"@testing-library/react": "^11.1.0", | ||
"@testing-library/user-event": "^12.1.10", | ||
|
@@ -21,6 +27,7 @@ | |
"@types/react": "^17.0.0", | ||
"@types/react-dom": "^17.0.0", | ||
"axios": "^0.21.2", | ||
"babel-loader": "^8.3.0", | ||
"babel-plugin-transform-react-remove-prop-types": "^0.4.24", | ||
"bootstrap": "^4.5.3", | ||
"cookie-parser": "~1.4.4", | ||
|
@@ -29,6 +36,7 @@ | |
"debug": "~2.6.9", | ||
"execa": "^4.0.3", | ||
"express": "~4.17.3", | ||
"file-loader": "^6.2.0", | ||
"jquery": "^3.5.1", | ||
"js-search": "^2.0.0", | ||
"mini-css-extract-plugin": "^1.3.3", | ||
|
@@ -40,10 +48,21 @@ | |
"react-dom": "^17.0.1", | ||
"react-router-dom": "^5.2.0", | ||
"react-scripts": "4.0.0", | ||
"sass": "^1.77.8", | ||
"sass-loader": "^16.0.1", | ||
"typescript": "^4.1.3", | ||
"web-vitals": "^0.2.4" | ||
"web-vitals": "^0.2.4", | ||
"webpack": "^5.93.0", | ||
"webpack-cli": "^5.1.4" | ||
}, | ||
"devDependencies": { | ||
"webpack-dev-server": "^3.11.1" | ||
}, | ||
"babel": { | ||
"presets": [ | ||
"@babel/preset-env", | ||
"@babel/preset-react", | ||
"@babel/preset-typescript" | ||
] | ||
} | ||
} |
Oops, something went wrong.