@@ -31,7 +31,7 @@ module.exports = () => {
31
31
32
32
const parsedData = JSON . parse ( data ) ;
33
33
console . log ( 'Data imported from settings.py:' , parsedData )
34
-
34
+
35
35
const APP_ROOT = parsedData [ 'APP_ROOT' ] ;
36
36
const ARCHES_APPLICATIONS = parsedData [ 'ARCHES_APPLICATIONS' ] ;
37
37
const ARCHES_APPLICATIONS_PATHS = parsedData [ 'ARCHES_APPLICATIONS_PATHS' ] ;
@@ -80,9 +80,9 @@ module.exports = () => {
80
80
// BEGIN create node modules aliases
81
81
const parsedPackageJSONFilepaths = { } ;
82
82
83
- let archesCorePackageJSONFilepath = Path . resolve ( __dirname , ROOT_DIR , '../ package.json' )
83
+ let archesCorePackageJSONFilepath = Path . resolve ( __dirname , ROOT_DIR , '..' , ' package.json')
84
84
if ( ! fs . existsSync ( archesCorePackageJSONFilepath ) ) {
85
- archesCorePackageJSONFilepath = Path . resolve ( __dirname , APP_ROOT , 'media ' , 'node_modules' , 'arches' , 'package.json' )
85
+ archesCorePackageJSONFilepath = Path . resolve ( __dirname , APP_ROOT , '.. ' , 'node_modules' , 'arches' , 'package.json' )
86
86
}
87
87
88
88
const archesCorePackageJSON = require ( archesCorePackageJSONFilepath ) ;
@@ -93,15 +93,15 @@ module.exports = () => {
93
93
acc [ alias ] = Path . resolve ( __dirname , ROOT_DIR , 'app' , 'media' , subPath ) ;
94
94
}
95
95
else {
96
- acc [ alias ] = Path . resolve ( __dirname , APP_ROOT , 'media ' , subPath ) ;
96
+ acc [ alias ] = Path . resolve ( __dirname , APP_ROOT , '.. ' , subPath ) ;
97
97
}
98
98
return acc ;
99
99
} , { } ) ;
100
100
101
101
let parsedProjectNodeModulesAliases = { } ;
102
102
let projectPackageJSON ;
103
103
104
- const projectJSONFilepath = Path . resolve ( __dirname , APP_ROOT , 'package.json' ) ;
104
+ const projectJSONFilepath = Path . resolve ( __dirname , APP_ROOT , '..' , ' package.json') ;
105
105
if ( fs . existsSync ( projectJSONFilepath ) ) { // handles running Arches without a project
106
106
projectPackageJSON = require ( projectJSONFilepath ) ;
107
107
parsedPackageJSONFilepaths [ Path . join ( projectPackageJSON . name , 'package.json' ) . replace ( / \\ / g, '/' ) ] = projectJSONFilepath ;
@@ -114,7 +114,7 @@ module.exports = () => {
114
114
)
115
115
}
116
116
else {
117
- acc [ alias ] = Path . resolve ( __dirname , APP_ROOT , 'media ' , subPath ) ;
117
+ acc [ alias ] = Path . resolve ( __dirname , APP_ROOT , '.. ' , subPath ) ;
118
118
}
119
119
return acc ;
120
120
} , { } ) ;
@@ -130,7 +130,7 @@ module.exports = () => {
130
130
archesApplicationJSONFilepath = Path . resolve ( __dirname , ARCHES_APPLICATIONS_PATHS [ archesApplication ] , '..' , 'package.json' ) ;
131
131
}
132
132
else {
133
- archesApplicationJSONFilepath = Path . resolve ( __dirname , APP_ROOT , 'media ' , 'node_modules' , archesApplication , 'package.json' )
133
+ archesApplicationJSONFilepath = Path . resolve ( __dirname , APP_ROOT , '.. ' , 'node_modules' , archesApplication , 'package.json' )
134
134
}
135
135
136
136
const archesApplicationPackageJSON = require ( archesApplicationJSONFilepath ) ;
@@ -148,7 +148,7 @@ module.exports = () => {
148
148
)
149
149
}
150
150
else {
151
- parsedArchesApplicationsNodeModulesAliases [ alias ] = Path . resolve ( __dirname , APP_ROOT , 'media ' , subPath ) ;
151
+ parsedArchesApplicationsNodeModulesAliases [ alias ] = Path . resolve ( __dirname , APP_ROOT , '.. ' , subPath ) ;
152
152
}
153
153
}
154
154
} catch ( error ) {
@@ -284,9 +284,9 @@ module.exports = () => {
284
284
__VUE_PROD_HYDRATION_MISMATCH_DETAILS__ : 'false'
285
285
} ) ,
286
286
new webpack . ProvidePlugin ( {
287
- $ : Path . resolve ( __dirname , APP_ROOT , 'media ' , 'node_modules' , 'jquery' , 'dist' , 'jquery.min' ) ,
288
- jQuery : Path . resolve ( __dirname , APP_ROOT , 'media ' , 'node_modules' , 'jquery' , 'dist' , 'jquery.min' ) ,
289
- jquery : Path . resolve ( __dirname , APP_ROOT , 'media ' , 'node_modules' , 'jquery' , 'dist' , 'jquery.min' )
287
+ $ : Path . resolve ( __dirname , APP_ROOT , '.. ' , 'node_modules' , 'jquery' , 'dist' , 'jquery.min' ) ,
288
+ jQuery : Path . resolve ( __dirname , APP_ROOT , '.. ' , 'node_modules' , 'jquery' , 'dist' , 'jquery.min' ) ,
289
+ jquery : Path . resolve ( __dirname , APP_ROOT , '.. ' , 'node_modules' , 'jquery' , 'dist' , 'jquery.min' )
290
290
} ) ,
291
291
new MiniCssExtractPlugin ( ) ,
292
292
new BundleTracker ( { filename : Path . resolve ( __dirname , `webpack-stats.json` ) } ) ,
@@ -298,23 +298,23 @@ module.exports = () => {
298
298
}
299
299
} ,
300
300
resolve : {
301
- modules : [ Path . resolve ( __dirname , APP_ROOT , 'media ' , 'node_modules' ) ] ,
301
+ modules : [ Path . resolve ( __dirname , APP_ROOT , '.. ' , 'node_modules' ) ] ,
302
302
alias : {
303
303
...javascriptRelativeFilepathToAbsoluteFilepathLookup ,
304
304
...templateFilepathLookup ,
305
305
...imageFilepathLookup ,
306
306
...nodeModulesAliases ,
307
307
...parsedPackageJSONFilepaths ,
308
308
'@' : [ Path . resolve ( __dirname , APP_ROOT , 'src' ) , ...archesApplicationsVuePaths , Path . resolve ( __dirname , ROOT_DIR , 'app' , 'src' ) ] ,
309
- 'node_modules' : Path . resolve ( __dirname , APP_ROOT , 'media ' , 'node_modules' )
309
+ 'node_modules' : Path . resolve ( __dirname , APP_ROOT , '.. ' , 'node_modules' )
310
310
} ,
311
311
} ,
312
312
module : {
313
313
rules : [
314
314
{
315
315
test : / \. t s x ? $ / ,
316
316
exclude : / n o d e _ m o d u l e s / ,
317
- loader : Path . join ( APP_ROOT , 'media ' , 'node_modules' , 'ts-loader' ) ,
317
+ loader : Path . join ( APP_ROOT , '.. ' , 'node_modules' , 'ts-loader' ) ,
318
318
options : {
319
319
appendTsSuffixTo : [ / \. v u e $ / ] ,
320
320
transpileOnly : true
@@ -323,7 +323,7 @@ module.exports = () => {
323
323
{
324
324
test : / \. v u e $ / ,
325
325
exclude : / n o d e _ m o d u l e s / ,
326
- loader :Path . join ( APP_ROOT , 'media ' , 'node_modules' , 'vue-loader' ) ,
326
+ loader :Path . join ( APP_ROOT , '.. ' , 'node_modules' , 'vue-loader' ) ,
327
327
} ,
328
328
{
329
329
test : / \. m j s $ / ,
@@ -333,10 +333,10 @@ module.exports = () => {
333
333
{
334
334
test : / \. j s $ / ,
335
335
exclude : [ / n o d e _ m o d u l e s / , / l o a d - c o m p o n e n t - d e p e n d e n c i e s / ] ,
336
- loader : Path . join ( APP_ROOT , 'media ' , 'node_modules' , 'babel-loader' ) ,
336
+ loader : Path . join ( APP_ROOT , '.. ' , 'node_modules' , 'babel-loader' ) ,
337
337
options : {
338
338
presets : [ '@babel/preset-env' ] ,
339
- cacheDirectory : Path . join ( APP_ROOT , 'media ' , 'node_modules' , '.cache' , 'babel-loader' ) ,
339
+ cacheDirectory : Path . join ( APP_ROOT , '.. ' , 'node_modules' , '.cache' , 'babel-loader' ) ,
340
340
}
341
341
} ,
342
342
{
@@ -349,10 +349,10 @@ module.exports = () => {
349
349
] ,
350
350
use : [
351
351
{
352
- 'loader' : Path . join ( APP_ROOT , 'media ' , 'node_modules' , 'style-loader' ) ,
352
+ 'loader' : Path . join ( APP_ROOT , '.. ' , 'node_modules' , 'style-loader' ) ,
353
353
} ,
354
354
{
355
- 'loader' : Path . join ( APP_ROOT , 'media ' , 'node_modules' , 'css-loader' ) ,
355
+ 'loader' : Path . join ( APP_ROOT , '.. ' , 'node_modules' , 'css-loader' ) ,
356
356
} ,
357
357
] ,
358
358
} ,
@@ -369,13 +369,13 @@ module.exports = () => {
369
369
'loader' : MiniCssExtractPlugin . loader ,
370
370
} ,
371
371
{
372
- 'loader' : Path . join ( APP_ROOT , 'media ' , 'node_modules' , 'css-loader' ) ,
372
+ 'loader' : Path . join ( APP_ROOT , '.. ' , 'node_modules' , 'css-loader' ) ,
373
373
} ,
374
374
{
375
- 'loader' : Path . join ( APP_ROOT , 'media ' , 'node_modules' , 'postcss-loader' ) ,
375
+ 'loader' : Path . join ( APP_ROOT , '.. ' , 'node_modules' , 'postcss-loader' ) ,
376
376
} ,
377
377
{
378
- 'loader' : Path . join ( APP_ROOT , 'media ' , 'node_modules' , 'sass-loader' ) ,
378
+ 'loader' : Path . join ( APP_ROOT , '.. ' , 'node_modules' , 'sass-loader' ) ,
379
379
options : {
380
380
sassOptions : {
381
381
indentWidth : 4 ,
@@ -392,7 +392,7 @@ module.exports = () => {
392
392
{
393
393
test : / \. h t m l ? $ / i,
394
394
exclude : / n o d e _ m o d u l e s / ,
395
- loader : Path . join ( APP_ROOT , 'media ' , 'node_modules' , 'html-loader' ) ,
395
+ loader : Path . join ( APP_ROOT , '.. ' , 'node_modules' , 'html-loader' ) ,
396
396
options : {
397
397
esModule : false ,
398
398
minimize : {
@@ -483,7 +483,7 @@ module.exports = () => {
483
483
{
484
484
test : / \. ( t x t | D S _ S t o r e ) $ / i,
485
485
exclude : / n o d e _ m o d u l e s / ,
486
- use : Path . join ( APP_ROOT , 'media ' , 'node_modules' , 'raw-loader' ) ,
486
+ use : Path . join ( APP_ROOT , '.. ' , 'node_modules' , 'raw-loader' ) ,
487
487
} ,
488
488
{
489
489
test : / \. ( p n g | s v g | j p g | j p e g | g i f ) $ / i,
0 commit comments