Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 6 additions & 15 deletions packages/react/transform/__test__/fixture.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -983,7 +983,6 @@ describe('dynamic import', () => {
const result = await transformReactLynx(
`\
(async function () {
await import();
await import(0);
await import(0, 0);
await import("./index.js", { with: { typo: "component" } });
Expand Down Expand Up @@ -1013,7 +1012,6 @@ describe('dynamic import', () => {
"import "@lynx-js/react/experimental/lazy/import";
import { __dynamicImport } from "@lynx-js/react/internal";
(async function() {
await import();
await import(0);
await import(0, 0);
await import("./index.js", {
Expand All @@ -1040,31 +1038,24 @@ describe('dynamic import', () => {
expect(await formatMessages(result.errors, { kind: 'error', color: false }))
.toMatchInlineSnapshot(`
[
"${errorIcon} [ERROR] \`import()\` with no argument is not allowed

:2:8:
2 │ await import();
╵ ~~~~~~~~

",
"${errorIcon} [ERROR] \`import(...)\` call with non-string literal module id is not allowed

:3:8:
3 │ await import(0);
:2:8:
2 │ await import(0);
╵ ~~~~~~~~~

",
"${errorIcon} [ERROR] \`import(...)\` call with non-string literal module id is not allowed

:4:8:
4 │ await import(0, 0);
:3:8:
3 │ await import(0, 0);
╵ ~~~~~~~~~~~~

",
"${errorIcon} [ERROR] \`import("...", ...)\` with invalid options is not allowed

:5:8:
5 │ await import("./index.js", { with: { typo: "component" } });
:4:8:
4 │ await import("./index.js", { with: { typo: "component" } });
╵ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,12 @@
"tasks": {
"build": {
"dependsOn": [],
"inputs": [".cargo/**", "src/**/*.rs", "Cargo.toml", "build.js"],
"inputs": [
".cargo/**",
"src/**/*.rs",
"Cargo.toml",
"build.js"
],
"outputs": ["swc_plugin_reactlynx_compat.wasm"]
}
}
Expand Down
7 changes: 6 additions & 1 deletion packages/react/transform/swc-plugin-reactlynx/turbo.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,12 @@
"tasks": {
"build": {
"dependsOn": [],
"inputs": [".cargo/**", "src/**/*.rs", "Cargo.toml", "build.js"],
"inputs": [
".cargo/**",
"src/**/*.rs",
"Cargo.toml",
"build.js"
],
"outputs": ["swc_plugin_reactlynx.wasm"]
}
}
Expand Down
Loading