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

How to access the style assets of next@css / next@sass after I change my folder structure? #3991

Closed
wellyshen opened this issue Mar 12, 2018 · 3 comments

Comments

@wellyshen
Copy link

wellyshen commented Mar 12, 2018

Thank you for this great framework. I'm using next@sass and I wanna know how to access the styles after I change my folder structure.

Here's my folder strcuture:
root
|---- src
|---- .next
|---- pages
|---- next.config.js

When I run yarn dev my css path is missed:

import Document, { Head, Main, NextScript } from 'next/document'

export default class MyDocument extends Document {
  render() {
    return (
      <html>
        <Head>
          <link rel="stylesheet" href="/_next/static/style.css" /> // <== How to adjust the path?
        </Head>
        <body>
          <Main />
          <NextScript />
        </body>
      </html>
    )
  }
}
@jbsmith731
Copy link

I'm having the same issue. I have my app inside of ./app directory. I've made the adjustments to the express server & the build command however my css file still 404s.

@jbsmith731
Copy link

@wellyshen see #4004

I updated to canary as suggested and this issue was resolved.

@wellyshen
Copy link
Author

@jbsmith731 Thanks I'll try it.

@lock lock bot locked as resolved and limited conversation to collaborators May 16, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants