Skip to content

Commit

Permalink
Add option to set publicPath
Browse files Browse the repository at this point in the history
  • Loading branch information
masad-frost authored Jan 25, 2019
1 parent 1d1473d commit a9969f2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ class MonacoWebpackPlugin {
const features = getFeaturesIds(options.features || [], featuresById);
const output = options.output || '';
this.options = {
publicPath: options.publicPath || '',
languages: languages.map((id) => languagesById[id]).filter(Boolean),
features: features.map(id => featuresById[id]).filter(Boolean),
output,
Expand All @@ -63,7 +64,7 @@ class MonacoWebpackPlugin {

apply(compiler) {
const { languages, features, output } = this.options;
const publicPath = getPublicPath(compiler);
const publicPath = this.options.publicPath || getPublicPath(compiler);
const modules = [EDITOR_MODULE].concat(languages).concat(features);
const workers = modules.map(
({ label, alias, worker }) => worker && (mixin({ label, alias }, worker))
Expand Down

0 comments on commit a9969f2

Please sign in to comment.