Skip to content

Commit 2bfcc3a

Browse files
committed
updated webpack to use resolve.alias instead of null-loader
1 parent c997e8c commit 2bfcc3a

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

webpack.config.js

+10-8
Original file line numberDiff line numberDiff line change
@@ -43,17 +43,19 @@ const config = {
4343
]
4444
}
4545
}
46-
},
47-
isLite && {
48-
test: /.*proj4.*/,
49-
use: {
50-
loader: "null-loader"
51-
}
5246
}
53-
].filter(Boolean)
47+
]
5448
},
5549
resolve: {
56-
modules: ["node_modules"]
50+
modules: ["node_modules"],
51+
alias: (() => {
52+
if (isLite) {
53+
return {
54+
proj4: false,
55+
"proj4-fully-loaded": false
56+
};
57+
}
58+
})()
5759
},
5860
externals: {
5961
leaflet: { root: "L", commonjs: "leaflet", amd: "leaflet", commonjs2: "leaflet" }

0 commit comments

Comments
 (0)