Commit 2f9c89a 1 parent fddd9e1 commit 2f9c89a Copy full SHA for 2f9c89a
File tree 1 file changed +7
-4
lines changed
1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -15,6 +15,7 @@ class AureliaWebpackPlugin {
15
15
options . root = options . root ? path . normalizeSafe ( options . root ) : path . dirname ( module . parent . filename ) ;
16
16
options . src = options . src ? path . normalizeSafe ( options . src ) : path . resolve ( options . root , 'src' ) ;
17
17
options . nameExternalModules = options . nameExternalModules == undefined || options . nameExternalModules == true ;
18
+ options . nameLocalModules = options . nameLocalModules == undefined || options . nameLocalModules == true ;
18
19
options . resourceRegExp = options . resourceRegExp || / a u r e l i a - l o a d e r - c o n t e x t / ;
19
20
options . customViewLoaders = Object . assign ( {
20
21
'.css' : [ 'css' ] ,
@@ -210,10 +211,12 @@ class AureliaWebpackPlugin {
210
211
if ( typeof module . resource == 'string' ) {
211
212
let moduleId ;
212
213
213
- if ( module . resource . startsWith ( options . src ) ) {
214
- // paths inside SRC
215
- let relativeToSrc = path . relative ( options . src , module . resource ) ;
216
- moduleId = relativeToSrc ;
214
+ if ( options . nameLocalModules ) {
215
+ if ( module . resource . startsWith ( options . src ) ) {
216
+ // paths inside SRC
217
+ let relativeToSrc = path . relative ( options . src , module . resource ) ;
218
+ moduleId = relativeToSrc ;
219
+ }
217
220
}
218
221
if ( options . nameExternalModules ) {
219
222
if ( ! moduleId && typeof module . userRequest == 'string' ) {
You can’t perform that action at this time.
0 commit comments