Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

js-routes: Allow precompilation of routes.js file in development. #5232

Merged
merged 2 commits into from
Apr 29, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -76,3 +76,6 @@ coverage/

# nbconvert python files
**/nbconvertvenv/

# If this file is pre-generated, for Windows and WSL 2 (see Wiki docker setup instructions)
app/javascript/routes.js
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,8 @@ dump.rdb
yarn-debug.log*
.yarn-integrity
yarn-error.log
# If this file is pre-generated, for Windows and WSL 2 (see Wiki docker setup instructions)
app/javascript/routes.js

# simplecov gem
coverage/
Expand Down
2 changes: 1 addition & 1 deletion app/javascript/packs/application.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ window.Jcrop = Jcrop;
import { Chart } from 'chart.js';
import 'javascripts/chart_config';

window.Routes = require('routes.js.erb');
window.Routes = require('routes');

// Override react-table defaultSortMethod
import { defaultSort } from 'javascripts/Components/Helpers/table_helpers';
Expand Down
2 changes: 1 addition & 1 deletion config/webpacker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ default: &default
- .woff2

extensions:
- .erb
- .mjs
- .js
- .jsx
Expand All @@ -49,6 +48,7 @@ default: &default
- .gif
- .jpeg
- .jpg
- .js.erb

development:
<<: *default
Expand Down