Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Non-compilable files #63

Open
Desouler opened this issue Nov 16, 2022 · 2 comments
Open

Non-compilable files #63

Desouler opened this issue Nov 16, 2022 · 2 comments

Comments

@Desouler
Copy link

Any way to support the swc --copy-files CLI arg somehow? Right now, non-compilable files like JSON, for example, do not trigger the event while watching, and also do not update after a file changes.

@airhorns
Copy link
Contributor

Thanks for the bug report! For the .json file you are working with, are you require-ing it from within your application?

@Desouler
Copy link
Author

Desouler commented Nov 17, 2022

Correct i do, like so:

import en from "./translations/en.json";

here is my swc config:

{ "$schema": "https://json.schemastore.org/swcrc", "module": { "type": "commonjs", "strict": false, "strictMode": true, "lazy": true, "noInterop": false }, "jsc": { "parser": { "syntax": "typescript", "tsx": false, "decorators": true, "dynamicImport": false }, "transform": { "legacyDecorator": true, "decoratorMetadata": true }, "target": "es2020", "loose": false, "externalHelpers": false }, "minify": false }

i am running wds with this command:
wds --inspect=11109 --watch ./src/index.ts -s

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants