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

Page or component style page-name should be different from global-styles #623

Open
JayaKrishnaNamburu opened this issue Oct 22, 2021 · 2 comments
Labels
bug Something isn't working good first issue Good for newcomers
Milestone

Comments

@JayaKrishnaNamburu
Copy link
Member

Change the global-stylesheet name to global-style across all flavours. In certain flavours we are having the name of pages and global styles as same. This is creating a clash for the imports. Here is a example to reproduce it
https://codesandbox.io/s/d039b?file=/src/routes/home/index.js

Since we save the dependencies from plugins using a Record<string, UIDLDependency>. When the file names are same and still paths are different, while saving with the DS we do using file name alone and not path. So the dependencies are joining even paths are different.

Expected

import projectStyles from '../../style.css'
import styles from './style.css'

Current behaviour

import projectStyles, { styles } from './style.css'
@JayaKrishnaNamburu JayaKrishnaNamburu added bug Something isn't working good first issue Good for newcomers labels Oct 22, 2021
@JayaKrishnaNamburu JayaKrishnaNamburu added this to the 0.20 milestone Feb 21, 2022
@JayaKrishnaNamburu
Copy link
Member Author

This is solved in teleport-project-generator-preact. That can be taken as reference to do the same for the rest of the frameworks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant