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 9568dea
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 6 deletions.
10 changes: 7 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,15 @@ 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');
}

return manager.resolveModule(toPath, module.filename);
}

_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.43",
"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.43"
},
"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.43",
"description": "",
"keywords": [],
"main": "dist/sandpack.umd.js",
Expand Down

0 comments on commit 9568dea

Please sign in to comment.