Skip to content
This repository has been archived by the owner on Mar 17, 2021. It is now read-only.

fix(index): handle protocol URL's correctly (options.publicPath) #253

Merged
merged 1 commit into from
Feb 21, 2018

Conversation

michael-ciniawsky
Copy link
Member

Issues

Notable Changes

Since publicPath can be a full URL (which can contain protocols), using path.join() to concat file paths isn't sufficient here

src/index.js Outdated
let outputPath = (
typeof options.outputPath === 'function' ? options.outputPath(url) : path.join(options.outputPath || '', url)
);
let outputPath = null;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let outputPath = url; and remove else

src/index.js Outdated
@@ -40,11 +54,16 @@ export default function loader(content) {

let publicPath = null;
Copy link
Member

@alexander-akait alexander-akait Feb 21, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

publicPath = `__webpack_public_path__ + ${JSON.stringify(outputPath)}`; and remove else

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants