Skip to content

Commit

Permalink
enhance: Support late process.env.WEBPACK_PUBLIC_PATH setting
Browse files Browse the repository at this point in the history
  • Loading branch information
ntucker committed Feb 28, 2022
1 parent 9e9f5b3 commit 6789637
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions packages/webpack-config-anansi/src/base/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,6 @@ const findCacheDir = require('find-cache-dir');
export { default as getStyleRules } from './css';
export { ROOT_PATH };

const WEBPACK_PUBLIC_HOST = process.env.WEBPACK_PUBLIC_HOST || '';
const WEBPACK_PUBLIC_PATH = process.env.WEBPACK_PUBLIC_PATH || '/';

export default function makeBaseConfig({
rootPath,
basePath,
Expand All @@ -34,6 +31,9 @@ export default function makeBaseConfig({
nohash,
argv,
}) {
const WEBPACK_PUBLIC_HOST = process.env.WEBPACK_PUBLIC_HOST || '';
const WEBPACK_PUBLIC_PATH = process.env.WEBPACK_PUBLIC_PATH || '/';

const modules = [path.join(rootPath, basePath), 'node_modules'];
const resolve = {
modules,
Expand Down Expand Up @@ -248,6 +248,7 @@ export default function makeBaseConfig({
excludeAssets: [/\.map/],
},
};

if (
process.env.WEBPACK_NO_CACHE === true ||
process.env.WEBPACK_NO_CACHE === 'true' ||
Expand Down

0 comments on commit 6789637

Please sign in to comment.