Skip to content

Commit

Permalink
Fix import.meta.url Pathing
Browse files Browse the repository at this point in the history
  • Loading branch information
evanplaice committed Feb 5, 2020
1 parent 8523cb3 commit beb1ebe
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 5 deletions.
3 changes: 1 addition & 2 deletions index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion index.min.js

Large diffs are not rendered by default.

3 changes: 1 addition & 2 deletions src/wc-monaco-editor.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
/* eslint no-undef: 0 */
import '../monaco/editor.main.js';

const pathname = new URL(import.meta.url).href;
const monacoDir = pathname.split('/').slice(0, -1).join('/') + '/monaco/';
const monacoDir = new URL('monaco/', import.meta.url);

// eslint-disable-next-line
self.MonacoEnvironment = {
Expand Down

0 comments on commit beb1ebe

Please sign in to comment.