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

Проблема с вставкой инлайновых скриптов #102

Closed
adm1t opened this issue May 14, 2021 · 3 comments
Closed

Comments

@adm1t
Copy link
Contributor

adm1t commented May 14, 2021

Есть необходимость заинлайнить скрипт после подключения js-бандла.

block page-bottom
  script(src='js/bundle.js')
  script
    include ../js/some-script.js

При такой записи содержимое второго тега script при сборке остаётся пустым (путь к файлу корректен; если убрать подключение бандла, то скрипт инлайнится как и должен). Это какие-то ограничения для разметки в pug или все же баг в сборке?

@npofopr
Copy link

npofopr commented May 14, 2021

Там бывало, что доктайп в конфиге к пагу надо указывать было

let pugOption = {
  filters: { 'show-code': filterShowCode },
  doctype: 'html'

@nicothin
Copy link
Owner

Баг сымитировал.
Это связано с компиляцией pug, видимо (сборка на это не влияет).
Попробую поискать причину и устранить ее.

@nicothin
Copy link
Owner

Нет, таки виновата была сборка ))

2e78fed — вот фикс.

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

3 participants