Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
danilowoz committed Jul 9, 2024
1 parent 11aaf77 commit a3b1a57
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 35 deletions.
4 changes: 2 additions & 2 deletions sandpack-client/src/clients/node/client.utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,14 +85,14 @@ export const findStartScriptPackageJson = (
}

if (item.type === TokenType.Command && commandNotFoundYet) {
command = item.value;
command = item.value!;
}

if (
item.type === TokenType.Argument ||
(!commandNotFoundYet && item.type === TokenType.Command)
) {
args.push(item.value);
args.push(item.value!);
}

// TODO: support TokenType.AND, TokenType.OR, TokenType.PIPE
Expand Down
1 change: 0 additions & 1 deletion sandpack-react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,6 @@
"astring": "^1.8.4",
"babel-loader": "^7.1.5",
"rollup-plugin-filesize": "^10.0.0",
"rollup-plugin-preserve-directives": "^0.4.0",
"storybook": "^7.5.1",
"typescript": "^5.2.2"
},
Expand Down
4 changes: 1 addition & 3 deletions sandpack-react/rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ const commonjs = require("@rollup/plugin-commonjs");
const replace = require("@rollup/plugin-replace");
const typescript = require("@rollup/plugin-typescript");
const filesize = require("rollup-plugin-filesize");
const { preserveDirectives } = require("rollup-plugin-preserve-directives");

const pkg = require("./package.json");
const generateUnstyledTypes = require("./scripts/rollup-generate-unstyled-types");
Expand Down Expand Up @@ -32,8 +31,7 @@ const configBase = [
},
}),
typescript({ tsconfig: "./tsconfig.json" }),
filesize(),
preserveDirectives({ suppressPreserveModulesWarning: true })
filesize()
),
output: [
{
Expand Down
10 changes: 5 additions & 5 deletions website/docs/src/pages/advanced-usage/serving-static-files.mdx
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
# Serving static files

Sandpack is introducing beta support to serve static files inside each Sandpack instance, meaning that by enabling the following flag, it's possible to use files such as SVG, fonts, images, etc.
Sandpack is introducing beta support for serving static files inside each Sandpack instance. Files such as SVGs, fonts, images, etc., can now be used by enabling the flag specified below.

By enabling this feature, Sandpack will register a new Service Worker in the iframe, intercepting requests and sending back the content from your Sandpack instance. Before using it in production, you should carefully test your sandboxes and keep in mind that the current implementation might have limitations and unknown issues.
By enabling this feature, Sandpack will register a new Service Worker in the iframe, intercepting requests and sending back the content from your Sandpack instance. Before using it in production, carefully test your Sandboxes and remember that the current implementation might have limitations and unknown issues.

**Limitation:** All static files served by the Sandpack should be placed inside the /public folder. If this doesn't work for you, please open a new issue in GitHub.
**Limitation:** All static files served by Sandpack should be placed inside the `/public` folder. If this doesn't work for you, please open a new issue on [GitHub](https://github.com/codesandbox/sandpack/issues).

<br />

```jsx
<SandpackProvider
<SandpackProvider
options={{
experimental_enableServiceWorker: true,
}}
Expand All @@ -24,4 +24,4 @@ By enabling this feature, Sandpack will register a new Service Worker in the ifr
experimental_enableServiceWorker: true,
}}
/>
```
```
24 changes: 0 additions & 24 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3518,15 +3518,6 @@
estree-walker "^2.0.2"
picomatch "^2.3.1"

"@rollup/pluginutils@^5.1.0":
version "5.1.0"
resolved "https://registry.yarnpkg.com/@rollup/pluginutils/-/pluginutils-5.1.0.tgz#7e53eddc8c7f483a4ad0b94afb1f7f5fd3c771e0"
integrity sha512-XTIWOPPcpvyKI6L1NHo0lFlCyznUEyPmPY1mc3KpPVDYulHSTvyeLNVW00QTLIAFNhR3kYnJTQHeGqU4M3n09g==
dependencies:
"@types/estree" "^1.0.0"
estree-walker "^2.0.2"
picomatch "^2.3.1"

"@rushstack/eslint-patch@^1.3.3":
version "1.5.1"
resolved "https://registry.yarnpkg.com/@rushstack/eslint-patch/-/eslint-patch-1.5.1.tgz#5f1b518ec5fa54437c0b7c4a821546c64fed6922"
Expand Down Expand Up @@ -11504,13 +11495,6 @@ magic-string@^0.30.0:
dependencies:
"@jridgewell/sourcemap-codec" "^1.4.15"

magic-string@^0.30.5:
version "0.30.10"
resolved "https://registry.yarnpkg.com/magic-string/-/magic-string-0.30.10.tgz#123d9c41a0cb5640c892b041d4cfb3bd0aa4b39e"
integrity sha512-iIRwTIf0QKV3UAnYK4PU8uiEc4SRh5jX0mwpIwETPpHdhVM4f53RSwS/vXvN1JhGX+Cs7B8qIq3d6AH49O5fAQ==
dependencies:
"@jridgewell/sourcemap-codec" "^1.4.15"

make-dir@4.0.0:
version "4.0.0"
resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-4.0.0.tgz#c3c2307a771277cd9638305f915c29ae741b614e"
Expand Down Expand Up @@ -14931,14 +14915,6 @@ rollup-plugin-filesize@^10.0.0:
pacote "^15.1.1"
terser "^5.6.0"

rollup-plugin-preserve-directives@^0.4.0:
version "0.4.0"
resolved "https://registry.yarnpkg.com/rollup-plugin-preserve-directives/-/rollup-plugin-preserve-directives-0.4.0.tgz#5e22f448a49b8aa28898d151e7a707b0eab15a6e"
integrity sha512-gx4nBxYm5BysmEQS+e2tAMrtFxrGvk+Pe5ppafRibQi0zlW7VYAbEGk6IKDw9sJGPdFWgVTE0o4BU4cdG0Fylg==
dependencies:
"@rollup/pluginutils" "^5.1.0"
magic-string "^0.30.5"

rollup-plugin-string@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/rollup-plugin-string/-/rollup-plugin-string-3.0.0.tgz#fed2d6301fae1e59eb610957df757ef13fada3f0"
Expand Down

0 comments on commit a3b1a57

Please sign in to comment.