Add webpack aliases for CSS and JS directories
This commit is contained in:
parent
0215e31154
commit
deb6f26836
|
@ -1,5 +1,5 @@
|
||||||
import '../css/tailwind.pcss'
|
|
||||||
import 'alpinejs'
|
import 'alpinejs'
|
||||||
|
import 'styles/tailwind.pcss'
|
||||||
import hljs from 'highlightjs'
|
import hljs from 'highlightjs'
|
||||||
|
|
||||||
document.addEventListener('DOMContentLoaded', event => {
|
document.addEventListener('DOMContentLoaded', event => {
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
let Encore = require('@symfony/webpack-encore')
|
let Encore = require('@symfony/webpack-encore')
|
||||||
|
let path = require('path')
|
||||||
|
|
||||||
Encore
|
Encore
|
||||||
.disableSingleRuntimeChunk()
|
.disableSingleRuntimeChunk()
|
||||||
|
@ -6,10 +7,15 @@ Encore
|
||||||
.setOutputPath('build/')
|
.setOutputPath('build/')
|
||||||
.setPublicPath('/themes/custom/opdavies/build')
|
.setPublicPath('/themes/custom/opdavies/build')
|
||||||
|
|
||||||
.addEntry('app', './assets/js/app.js')
|
.addEntry('app', '@/app.js')
|
||||||
|
|
||||||
.enablePostCssLoader()
|
.enablePostCssLoader()
|
||||||
|
|
||||||
|
.addAliases({
|
||||||
|
'@': path.resolve(__dirname, 'assets', 'js'),
|
||||||
|
styles: path.resolve(__dirname, 'assets', 'css')
|
||||||
|
})
|
||||||
|
|
||||||
if (!Encore.isProduction()) {
|
if (!Encore.isProduction()) {
|
||||||
Encore.enableSourceMaps()
|
Encore.enableSourceMaps()
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue