Issue 1:
Bug report

What is the current behavior?

Webpack build fails with RuntimeTemplate.moduleId() ... has no id. This should not happen error.

If the current behavior is a bug, please provide the steps to reproduce.

Checkout master branch

https://github.com/kompot/treat-no-module-id-2

it's basically a barebones React app but using treat for styling.

yarn install
yarn run build

ERROR in chunk 1
1.output.bundle.js
/Users/kompot/projects/treat-no-module-id-2/node_modules/babel-loader/lib/index.js??ref--5!/Users/kompot/projects/treat-no-module-id-2/src/components/module/Component2.jsx
RuntimeTemplate.moduleId(): Module /Users/kompot/projects/treat-no-module-id-2/node_modules/treat/webpack-plugin/loader.js??ref--4-0!/Users/kompot/projects/treat-no-module-id-2/node_modules/babel-loader/lib/index.js??ref--5!/Users/kompot/projects/treat-no-module-id-2/src/components/module/Component2.treat.js has no id. This should not happen.

ERROR in chunk 2
2.output.bundle.js
/Users/kompot/projects/treat-no-module-id-2/node_modules/babel-loader/lib/index.js??ref--5!/Users/kompot/projects/treat-no-module-id-2/src/components/module/Component2.jsx
RuntimeTemplate.moduleId(): Module /Users/kompot/projects/treat-no-module-id-2/node_modules/treat/webpack-plugin/loader.js??ref--4-0!/Users/kompot/projects/treat-no-module-id-2/node_modules/babel-loader/lib/index.js??ref--5!/Users/kompot/projects/treat-no-module-id-2/src/components/module/Component2.treat.js has no id. This should not happen.

What is the expected behavior?

Build should succeed. There are 4 "fixes" that make the build pass.

https://github.com/kompot/treat-no-module-id-2/pull/1/files

https://github.com/kompot/treat-no-module-id-2/pull/2/files

https://github.com/kompot/treat-no-module-id-2/pull/3/files

https://github.com/kompot/treat-no-module-id-2/pull/4/files

The last one is probably the most interesting one — turning off

optimization: {
concatenateModules: false
}

Others are changing dependency tree and it somehow affects the build.

Other relevant information:

webpack version: 4.42.1

Node.js version: 12.16.0

Operating System: macOS 10.15.4

I understand that this might be at least partially related to a 3rd party project (see the initial issue in treat repo) but any help in debugging this issue would be greatly appreciated.

Looks like it might be the duplicate of

#10409

if that so then should the fix be expected for webpack 4?

Thanks!

Issue 2:
** I want report a some like bug **

Probably incrorrect letter case in filenames make bundlers duplicating modules and work all library is failed.

I faced with problem, when webpack and rollup duplicates modules.

I am working on Windows. She is not make it differece between low and up case letters in filenames. For she 'File.js' and 'file.js' are one entity. But Unix-like systems recognize they as two diffirent entities. And bundlers (webpack, rollup) also do. Let you are working on Windows, and you make two 'import' operations, in the one you write from 'File.js', in the second you write 'file.js'. Both are reffered to same file. However bunlers make two copy of this module.

I made all filenames and statement 'import from' to low case, and problem vanished. It is truth for Webpack. I don't try with rollup yet.

Probably could make some sort of option for show warning about possibily making duplicate modules or option for ignore case in filenames, i don't know.

Sorry for bothering you, if my issue happen usesless.