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

The autoloader cannot determine the path if a time stamp is added to it. #2244

Closed
KryukovDS opened this issue Mar 10, 2020 · 0 comments · Fixed by #2245
Closed

The autoloader cannot determine the path if a time stamp is added to it. #2244

KryukovDS opened this issue Mar 10, 2020 · 0 comments · Fixed by #2245

Comments

@KryukovDS
Copy link

I'm always frustrated when the auto-loader cannot automatically determine the local path to the component files due to the presence of a timestamp in the address for connecting scripts:

<script type="text/javascript" src="/local/js/ext/prism/components/prism-core.min.js?15836007616445"></script>
<script type="text/javascript" src="/local/js/ext/prism/plugins/autoloader/prism-autoloader.min.js?15838218154204"></script>

In my case, the timestamps are automatically added by the Bitrix CMS when the plugin is connected in the form of its local js extension.

Please modify the regular expressions in the "autoloader" plugin:

var autoloaderFile = /\bplugins\/autoloader\/prism-autoloader\.(?:min\.)js$/i;
var prismFile = /[\w-]+\.(?:min\.)js$/i;

so that the paths to the scripts specified with additional get parameters are also determined for automatic loading of languages ​​from the relatively located "components" folder.

Translation: translate.google.com

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

Successfully merging a pull request may close this issue.

2 participants