Add turbolinks
This commit is contained in:
parent
d2858c6315
commit
51595b6c6d
|
@ -1,8 +1,11 @@
|
|||
import 'alpinejs'
|
||||
import '../css/app.pcss'
|
||||
import turbolinks from 'turbolinks'
|
||||
|
||||
window.hljs = require('highlightjs')
|
||||
|
||||
let html = document.documentElement
|
||||
html.classList.remove('no-js')
|
||||
html.classList.add('js')
|
||||
|
||||
turbolinks.start()
|
||||
|
|
11
package-lock.json
generated
11
package-lock.json
generated
|
@ -1053,9 +1053,9 @@
|
|||
},
|
||||
"dependencies": {
|
||||
"acorn": {
|
||||
"version": "7.1.0",
|
||||
"resolved": "https://registry.npmjs.org/acorn/-/acorn-7.1.0.tgz",
|
||||
"integrity": "sha512-kL5CuoXA/dgxlBbVrflsflzQ3PAas7RYZB52NOm/6839iVYJgKMJ3cQJD+t2i5+qFa8h3MDpEOJiS64E8JLnSQ=="
|
||||
"version": "7.1.1",
|
||||
"resolved": "https://registry.npmjs.org/acorn/-/acorn-7.1.1.tgz",
|
||||
"integrity": "sha512-add7dgA5ppRPxCFJoAGfMDi7PIBXq1RtGo7BhbLaxwrXPOmw8gq48Y9ozT01hUKy9byMjlR20EJhu5zlkErEkg=="
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -8607,6 +8607,11 @@
|
|||
"resolved": "https://registry.npmjs.org/tty-browserify/-/tty-browserify-0.0.0.tgz",
|
||||
"integrity": "sha1-oVe6QC2iTpv5V/mqadUk7tQpAaY="
|
||||
},
|
||||
"turbolinks": {
|
||||
"version": "5.2.0",
|
||||
"resolved": "https://registry.npmjs.org/turbolinks/-/turbolinks-5.2.0.tgz",
|
||||
"integrity": "sha512-pMiez3tyBo6uRHFNNZoYMmrES/IaGgMhQQM+VFF36keryjb5ms0XkVpmKHkfW/4Vy96qiGW3K9bz0tF5sK9bBw=="
|
||||
},
|
||||
"type": {
|
||||
"version": "1.2.0",
|
||||
"resolved": "https://registry.npmjs.org/type/-/type-1.2.0.tgz",
|
||||
|
|
|
@ -19,7 +19,8 @@
|
|||
"tailwindcss-interaction-variants": "^2.2.0",
|
||||
"tailwindcss-skip-link": "^1.0.1",
|
||||
"tailwindcss-spaced-items": "^0.1.0",
|
||||
"tailwindcss-visuallyhidden": "^1.0.2"
|
||||
"tailwindcss-visuallyhidden": "^1.0.2",
|
||||
"turbolinks": "^5.2.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"eslint": "^5.15.3",
|
||||
|
|
|
@ -12,12 +12,13 @@ Encore
|
|||
.configureLoaderRule('css', loaderRule => {
|
||||
loaderRule.test = /\.(css|p(ost)?css)$/
|
||||
})
|
||||
.enableSourceMaps(!Encore.isProduction())
|
||||
|
||||
if (Encore.isProduction()) {
|
||||
Encore
|
||||
.enableVersioning()
|
||||
.addPlugin(new PurgecssPlugin(purgecssConfig))
|
||||
} else {
|
||||
Encore.enableSourceMaps()
|
||||
}
|
||||
|
||||
module.exports = Encore.getWebpackConfig()
|
||||
|
|
Reference in a new issue