# root-path-loader **Repository Path**: zrw_git/root-path-loader ## Basic Information - **Project Name**: root-path-loader - **Description**: No description available - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2022-02-12 - **Last Updated**: 2024-08-13 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README ``` chainWebpack: config => { config.module.rule('path') .include.add(resolve("src")) .end() .exclude.add(resolve("node_modules")) .end() .test(/\.(css|less|scss|sass|js|vue)$/) .use('root-path-loader') .loader('root-path-loader') //.options({ root: '/@root/', newRoot: process.env.NODE_ENV === "production" ? "/dataCenter/" : "/" }) .options({ patterns: [ { root: '/@root/public/', newRoot: process.env.NODE_ENV === "production" ? "/project/" : "/a/" }, { root: '/@root/', newRoot: process.env.NODE_ENV === "production" ? "/project/" : "/" }, ] }) .end() } ```