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

When Code Splitting and adding jquery-match-height to the second script file it fails to register. #185

Open
stephen-calm opened this issue Sep 7, 2023 · 0 comments

Comments

@stephen-calm
Copy link

stephen-calm commented Sep 7, 2023

The following is my experience

home.html

<script type="text/javascript" src="{% static 'js/global-min.js' %}"></script>
<script type="text/javascript" src="{% static 'js/pages/home-min.js' %}"></script>

The following works...

global.js --> global-min.js

import $ from 'jquery';
window.$ = window.jQuery = $;

require('retinajs');
require('bootstrap');
require('jquery-match-height')
require('./default.js');

home.js --> home-min.js

require('owl.carousel');
require('../blocks/advantage.js');
....

The following fails in .matchHeight() dosnt exist.

global.js --> global-min.js

import $ from 'jquery';
window.$ = window.jQuery = $;

require('retinajs');
require('bootstrap');
require('./default.js');

home.js --> home-min.js

require('jquery-match-height')
require('owl.carousel');
require('../blocks/advantage.js');

The following fails in .toolTip() dosnt exist.

global.js --> global-min.js

import $ from 'jquery';
window.$ = window.jQuery = $;

require('retinajs');
require('bootstrap');
require('./default.js');

home.js --> home-min.js

import $ from 'jquery';
window.$ = window.jQuery = $;

require('jquery-match-height')
require('owl.carousel');
require('../blocks/advantage.js');

Obviously if match hight was only used occasionally on some pages this would be a problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant