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

Generate a jsconfig.json #55

Open
jho406 opened this issue May 3, 2024 · 0 comments
Open

Generate a jsconfig.json #55

jho406 opened this issue May 3, 2024 · 0 comments

Comments

@jho406
Copy link
Collaborator

jho406 commented May 3, 2024

superglue_rails generates page components with import statements that uses relative links. For example, in application.js we import page components like ../../views/posts/index.js. Adding a jsonconfig.json would help to shorten those imports. For example:

{
  "compilerOptions": {
    "target": "ES2016",
    "module": "ESNext",
    "moduleResolution": "Bundler", // << you should enable this
    "esModuleInterop": true,
    "paths": {
      "@/*": ["./app/javascript/*"]
    }
  },
  "exclude": ["node_modules/**/*"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Needs planning
Development

No branches or pull requests

1 participant