You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
pages / components / JS is bundled into ./src/.next
server.js correctly loads JS resources from .next directory.
./src/.next/static is created with the bundle.css
**head is trying to resolve /static to ./src/static instead of ./next/static
What I've tried
I've tried everything under the sun for filename in next.config.js and I cannot seem to get it to drop the static directory into ./src when running yarn build. It either is nowhere (presumably in relative path in the build process, deep in my file system) or is in .next which is not referenced in <head>
Expected Behavior
I think that static should get compiled to .next and used there. It would be a much cleaner solution. However, I get that sometimes static will be very large, (due to images and the like) so that might not be the best solution. Therefore, any help getting static to populate when using a src override with build would be amazing.
I have searched the issues of this repository and believe that this is not a duplicate.
Steps to Reproduce (for bugs)
See Above
Outcome
If I'm able to get this fixed, I can update the external-css example (or make a new css-module example that will help the community have a non-js-in-css option that is modern and scalable.
Your Environment
Tech
Version
next
4.14
node
8
OS
osx
browser
chrome
etc
The text was updated successfully, but these errors were encountered:
The core of this is we don't yet support most of the webpack loaders and ExtractTextPlugin. We know about this issue and working on a solution right now.
Also, could this perhaps be helped by having next surface an ENV variable like build_directory so we could use that to construct the path in our next config file?
For now it seems like I'll have to run dev and cancel the process to get static populated
I have overwritten next to use
src
for the content of my application and am usingexpress
to serve my application.What happens:
Running
yarn dev
===NODE_ENV=dev node server.js
./src/static/styles/bundle.css
is created and refreshed on file changesnext
properly references the/static
directory in thehead
so my styles appearRuning
yarn build
===next build src
&&yarn start
===NODE_ENV=production node server.js
./src/.next
server.js
correctly loads JS resources from.next
directory../src/.next/static
is created with thebundle.css
head
is trying to resolve/static
to./src/static
instead of./next/static
What I've tried
I've tried everything under the sun for
filename
innext.config.js
and I cannot seem to get it to drop thestatic
directory into./src
when runningyarn build
. It either is nowhere (presumably in relative path in the build process, deep in my file system) or is in.next
which is not referenced in<head>
Expected Behavior
I think that
static
should get compiled to.next
and used there. It would be a much cleaner solution. However, I get that sometimesstatic
will be very large, (due to images and the like) so that might not be the best solution. Therefore, any help gettingstatic
to populate when using asrc
override withbuild
would be amazing.Steps to Reproduce (for bugs)
Outcome
If I'm able to get this fixed, I can update the
external-css
example (or make a newcss-module
example that will help the community have a non-js-in-css option that is modern and scalable.Your Environment
The text was updated successfully, but these errors were encountered: