mirror of
https://github.com/Sylius/Sylius.git
synced 2026-07-05 20:57:12 +00:00
Add the $rootDir variable to the SCSS loader
This commit is contained in:
parent
a3dd068e02
commit
c4f700b6d2
2 changed files with 3 additions and 3 deletions
|
|
@ -11,7 +11,7 @@ const path = require('path');
|
|||
const Encore = require('@symfony/webpack-encore');
|
||||
|
||||
class SyliusAdmin {
|
||||
static getWebpackConfig() {
|
||||
static getWebpackConfig(rootDir) {
|
||||
const uiBundleScripts = path.resolve(__dirname, '../UiBundle/Resources/private/js/');
|
||||
const uiBundleResources = path.resolve(__dirname, '../UiBundle/Resources/private/');
|
||||
|
||||
|
|
@ -25,7 +25,7 @@ class SyliusAdmin {
|
|||
.enableVersioning(Encore.isProduction())
|
||||
.enableSassLoader((options) => {
|
||||
// eslint-disable-next-line no-param-reassign
|
||||
options.additionalData = `$assetsPath: ${path.resolve(__dirname, 'Resources/assets')};`;
|
||||
options.additionalData = `$rootDir: ${rootDir};`;
|
||||
});
|
||||
|
||||
const adminConfig = Encore.getWebpackConfig();
|
||||
|
|
|
|||
|
|
@ -25,6 +25,6 @@ shopConfig.name = 'shop';
|
|||
|
||||
Encore.reset();
|
||||
|
||||
const adminConfig = SyliusAdmin.getWebpackConfig();
|
||||
const adminConfig = SyliusAdmin.getWebpackConfig(path.resolve(__dirname));
|
||||
|
||||
module.exports = [shopConfig, adminConfig];
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue