@@ -4,6 +4,10 @@ const webpack = require("webpack");
44const FaviconsWebpackPlugin = require ( "favicons-webpack-plugin" ) ;
55const CopyPlugin = require ( "copy-webpack-plugin" ) ;
66
7+ function resolveToProjRoot ( relPath ) {
8+ return path . resolve ( __dirname , relPath ) ;
9+ }
10+
711module . exports = {
812 module : {
913 rules : [
@@ -21,13 +25,10 @@ module.exports = {
2125 / \/ \@ e s l i n t \/ .* \/ c o n f i g - a r r a y - f a c t o r y / ,
2226 / \/ \@ e s l i n t \/ .* \/ r e l a t i v e - m o d u l e - r e s o l v e r / ,
2327 / \/ e s l i n t \/ e s l i n t \. j s / ,
24- // /\/@typescript-eslint\/experimental-utils\/dist\/ts-eslint/,
2528 / \/ @ t y p e s c r i p t - e s l i n t \/ e x p e r i m e n t a l - u t i l s \/ d i s t \/ t s - e s l i n t \/ R u l e T e s t e r .j s / ,
2629 / \/ @ t y p e s c r i p t - e s l i n t \/ e x p e r i m e n t a l - u t i l s \/ d i s t \/ e s l i n t - u t i l s \/ R u l e T e s t e r .j s / ,
2730 / \/ @ t y p e s c r i p t - e s l i n t \/ .* \/ C L I E n g i n e / ,
28- // /\/@typescript-eslint\/.*\/globby/,
2931 / \/ @ t y p e s c r i p t - e s l i n t \/ .* \/ c r e a t e - p r o g r a m \/ c r e a t e W a t c h P r o g r a m .j s / ,
30- / \. d \. t s $ / ,
3132 ] ,
3233 use : "null-loader" ,
3334 } ,
@@ -66,24 +67,24 @@ module.exports = {
6667 plugins : [
6768 new webpack . NormalModuleReplacementPlugin (
6869 / r e s o l v e \- f r o m / ,
69- path . resolve ( __dirname , "./ src/modules/resolve-from.js")
70+ resolveToProjRoot ( " src/modules/resolve-from.js")
7071 ) ,
7172 new webpack . NormalModuleReplacementPlugin (
7273 / e s q u e r y / ,
73- path . resolve ( __dirname , "./ node_modules/esquery/dist/esquery.js")
74+ resolveToProjRoot ( " node_modules/esquery/dist/esquery.js")
7475 ) ,
7576 new webpack . NormalModuleReplacementPlugin (
7677 / g l o b b y / ,
77- path . resolve ( __dirname , "./ src/modules/globby.js")
78+ resolveToProjRoot ( " src/modules/globby.js")
7879 ) ,
7980 new HtmlPlugin ( {
8081 template : "./src/index.html" ,
8182 filename : "./index.html" ,
8283 } ) ,
83- new FaviconsWebpackPlugin ( path . resolve ( __dirname , "./ assets/favicon.png") ) ,
84+ new FaviconsWebpackPlugin ( resolveToProjRoot ( " assets/favicon.png") ) ,
8485 new CopyPlugin ( {
8586 patterns : [
86- { from : path . resolve ( __dirname , "assets/share.png" ) , to : "assets" } ,
87+ { from : resolveToProjRoot ( "assets/share.png" ) , to : "assets" } ,
8788 ] ,
8889 } ) ,
8990 ] ,
0 commit comments