Skip to content

Commit

Permalink
Fix module
Browse files Browse the repository at this point in the history
  • Loading branch information
Ives van Hoorne committed Jul 5, 2018
1 parent 2b042a9 commit ecc94e2
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 6 deletions.
11 changes: 8 additions & 3 deletions packages/app/src/sandbox/eval/transpiled-module.js
Original file line number Diff line number Diff line change
Expand Up @@ -833,11 +833,16 @@ export default class TranspiledModule {
id = undefined;
loaded = false;

_resolveFilename() {
return manager.resolveModule(usedPath, localModule.path);
static _resolveFilename(toPath: string, module) {
if (module.filename == null) {
throw new Error('Module has no filename');
}

const m = manager.resolveModule(toPath, module.filename);
return m.path;
}

_nodeModulePaths() {
static _nodeModulePaths() {
return [];
}
};
Expand Down
4 changes: 2 additions & 2 deletions packages/react-sandpack/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-smooshpack",
"version": "0.0.41",
"version": "0.0.44",
"description": "",
"keywords": [],
"license": "SEE LICENSE.MD IN ROOT",
Expand Down Expand Up @@ -87,7 +87,7 @@
"react-broadcast": "^0.6.2",
"react-codemirror2": "^4.0.1",
"rollup-plugin-scss": "^0.4.0",
"smooshpack": "^0.0.41"
"smooshpack": "^0.0.44"
},
"peerDependencies": {
"react": "^16.0.0"
Expand Down
2 changes: 1 addition & 1 deletion packages/sandpack/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "smooshpack",
"version": "0.0.41",
"version": "0.0.44",
"description": "",
"keywords": [],
"main": "dist/sandpack.umd.js",
Expand Down

0 comments on commit ecc94e2

Please sign in to comment.