Issue 1:
I have overwritten next to use src for the content of my application and am using express to serve my application.

.
├── node_modules
├── package.json
├── server.js
├── src
│ ├── components
│ ├── next.config.js
│ ├── pages
│ ├── static (dynamic from webpack)
│ └── styles
└── yarn.lock

// next.config.js
const path = require('path');

const autoprefixer = require('autoprefixer');
const ExtractTextPlugin = require('extract-text-webpack-plugin');

module.exports = {
webpack: (config) => {
config.plugins.push(new ExtractTextPlugin({ // bundle all CSS for static export
filename : 'static/styles/bundle.css', //<--- PROBLEM LINE
allChunks : true,
}));

config.module.rules.push(
{
test : /(\.scss|\.css)$/,
loader : 'emit-file-loader',
options : {
name: './dist/[path][name].[ext]',
},
},
{
test : /(\.scss|\.css)$/,
loader : ExtractTextPlugin.extract({
fallback : 'style-loader',
use : [
{
loader : 'css-loader',
options : {
modules : true,
sourceMap : true,
importLoaders : 1,
localIdentName : '[name]__[local]___[hash:base64:5]',
},
},
{
loader : 'postcss-loader',
options : {
plugins: [autoprefixer],
},
},
{
loader : 'sass-loader',
options : {
includePaths: [path.resolve(__dirname, './')], //eslint-disable-line
},
},
],
}),
});

return config;
},
};

// server.js
const next = require('next');
const dev = process.env.NODE_ENV !== 'production';
const dir = './src';

const app = next({ dev, dir });

What happens:

Running yarn dev === NODE_ENV=dev node server.js

./src/static/styles/bundle.css is created and refreshed on file changes

next properly references the /static directory in the head so my styles appear

Runing yarn build === next build src && yarn start === NODE_ENV=production node server.js

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

Issue 2:
I have searched the issues of this repository and believe that this is not a duplicate.

Expected Behavior

Scrollview and left sidebar is in different container and when changing component's state should not affect others.

Current Behavior

Scrollview will always get affected when any component changing state.

Steps to Reproduce (for bugs)

go to https://wander.chat/ with safari.

scroll to the bottom.

click on the left top corner logo and scroll view will suddenly jump to the top

Context

I just want to make how it is working in google chrome and i had try to log which container/component is re-render but nothing is being re-render while scrollview keep on scrolling to the top.

Your Environment

Tech
Version

next
3.2.2

node
8.2.1

OS
macOs High Sierra v 10.13.1

browser
Safari v 11.0.1