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

Expected Behavior

I expect to be able to use semantic-ui-less and load it's related files via config.next.js webpack rules and plugins.

Current Behavior

Context

I'm hitting some walls myself with my next.config.js to use webpack to load all semantic-ui-less related files...

`

const { WebpackBundleSizeAnalyzerPlugin } = require('webpack-bundle-size-analyzer')

const { ANALYZE } = process.env

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

module.exports = {

webpack: function (config) {

config.module.rules.push({

test: /.less$/,

use: [

{ loader: 'style-loader', options: { } },

{ loader: 'css-loader', options: { } },

{ loader: 'less-loader', options: { } },

]

})

config.module.rules.push({

test: /.jpe?g$|.gif$|.png$|.ttf$|.eot$|.svg$/,

use: [{

loader: 'file-loader',

options: {

name: '[name].[ext]?[hash]'

}

}]

})

config.module.rules.push({

test: /.woff(2)?(?v=[0-9].[0-9].[0-9])?$/,

use: [{

loader: 'url-loader',

options: {

limit: '10000',

mimetype: 'application/fontwoff'

}

}]

})

// config.plugins.push(

// new ExtractTextPlugin({

// filename: "[name].[contenthash].css",

// disable: process.env.NODE_ENV === "development"

// })

// )

if (ANALYZE) {
config.plugins.push(
new WebpackBundleSizeAnalyzerPlugin('stats.txt')
)
}
return config

}

}

`

Depending on the order of the less loaders I get different errors...

style, css, less

`Unexpected token &

/Users/agustif/Documents/Git/cruceritis/node_modules/semantic-ui-less/semantic.less:14

& { @import "definitions/globals/reset"; }

^

SyntaxError: Unexpected token &

at createScript (vm.js:80:10)

at Object.runInThisContext (vm.js:139:10)

at Module._compile (module.js:588:28)

at Module._compile (/Users/agustif/Documents/Git/cruceritis/node_modules/source-map-support/source-map-support.js:492:25)

at Object.Module._extensions..js (module.js:635:10)

at Module.load (module.js:545:32)

at tryModuleLoad (module.js:508:12)

at Function.Module._load (module.js:500:3)

at Module.require (module.js:568:17)

at require (internal/module.js:11:18)`

less-style-css

`Error in semantic-ui-less/semantic.less

Module build failed:

// load the styles

var content = require("!!../css-loader/index.js??ref--6-2!./semantic.less");

^

Unrecognised input

in /Users/agustif/Documents/Git/cruceritis/node_modules/semantic-ui-less/semantic.less (line 4, column 12)`

css-less-style

`Error in semantic-ui-less/semantic.less

Module build failed:

// load the styles

var content = require("!!./semantic.less");

^

Unrecognised input

in /Users/agustif/Documents/Git/cruceritis/node_modules/semantic-ui-less/semantic.less (line 4, column 12)`

css-style-less

`Error in semantic-ui-less/semantic.less

Module build failed: Unknown word (5:1)

3 | // load the styles

4 | var content = require("!!../less-loader/dist/cjs.js??ref--6-2!./semantic.less");

5 | if(typeof content === 'string') content = [[module.id, content, '']];

| ^

6 | // Prepare cssTransformation

7 | var transform;

8 | `

"dependencies": { "next": "^4.1.4", "react": "^16.1.1", "react-dom": "^16.1.1", "semantic-ui-react": "^0.77.0" }, "devDependencies": { "css-loader": "^0.28.7", "extract-text-webpack-plugin": "^3.0.2", "file-loader": "^1.1.5", "find-in-files": "^0.4.0", "less": "^2.7.3", "less-loader": "^4.0.5", "ncp": "^2.0.0", "semantic-ui-less": "^2.2.12", "style-loader": "^0.19.0", "url-loader": "^0.6.2", "webpack-bundle-size-analyzer": "^2.7.0" } }

My Environment

Tech
Version

next
4.1.4

node
8.7.0

OS
macOS High Sierra 10.13.1

browser
Chrome

react
16.1.1

Issue 2:
Bug report

Describe the bug

Either Link or Router stops working when doing client side routing. It seems that HMR may be interrupting the transition between pages. It occurs most frequently if the app is left idle or in the background for a bit of time (although I have experienced it happening whilst clicking around without it being idle)

To Reproduce

Steps to reproduce the behavior, please provide code snippets or a repository:

Clone this repo (https://github.com/malimccalla/next-routing-issue)

Install dependencies npm install

Run the server npm run dev

Visit all pages by clicking the links

Go make a coffee (leave page idle for ~2mins)

Attempt to visit all pages by clicking the links

Certain links do not navigate to their respective page 😔

Expected behavior

I expect to be able to visit all the individual pages

Actual behaviour

Page does not navigate to certain routes. Refreshing the page will fix it

Screenshots

Both the "about" and "contact" links do not work (notice the HMR log on the first attempt of each route). After a page refresh they work as expected. If I leave the app idle for roughly 2mins again it will start over with the issue

System information

mac Mojave 10.14

Chrome

next.js v7.0.2

Additional context

With the console open you can see that the Router event routeChangeStart fires but routeChangeComplete never does.