Skip to content

Commit 93fa2a2

Browse files
committed
fix: static is default again
1 parent 7e39c44 commit 93fa2a2

2 files changed

Lines changed: 3 additions & 4 deletions

File tree

public/README.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ Open editor at first.
3636
<!-- sandpack:{
3737
"files": {
3838
"/src/index.js": {
39-
"prependCode": "import './index.css'; // Hack to load index.css. require parcel env \n",
39+
"appendCode": "// 次の行は本編とは無関係のコードなので無視してください\nconst link = document.createElement('link');link.rel='stylesheet';link.href='https://jsprimer.net/use-case/todoapp/final/final/index.css';document.head.append(link);\n",
4040
"path": "example2/src/index.js"
4141
},
4242
"/src/App.js": {
@@ -51,8 +51,7 @@ Open editor at first.
5151
"path": "example2/index.html"
5252
}
5353
},
54-
"entry": "/index.html",
55-
"environment": "parcel",
54+
"environment": "static",
5655
"options": {
5756
"showLineNumbers": true,
5857
"showInlineErrors": true,

src/sandpack.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ export const attachToElement = (element: HTMLElement | ChildNode, options: Sandb
111111
entry: options.entry,
112112
dependencies: options.dependencies,
113113
devDependencies: options.devDependencies,
114-
environment: options.environment ?? "parcel"
114+
environment: options.environment ?? "static"
115115
};
116116
const entry = options.entry;
117117
const sandpackOptions = options.options;

0 commit comments

Comments
 (0)