Closed 4iAmAve closed 4 years ago
The injected link tag should reference the correct link URL.
The passed url parameter into the link tag function is an esModule (for whatever reason) as follows:
url
{ "default": "//localhost:4001/main.css" }
Hence the appended <link /> child looks like this:
<link />
<link rel="stylesheet" href="[object Module]">
No matter whether we use import './main.css' or require('./main.css'); in our component code. Even import styles from './main.css' does not help.
import './main.css'
require('./main.css');
import styles from './main.css'
{ test: /\.css$/, use: [ { loader: 'style-loader', options: { injectType: 'linkTag' } }, { loader: 'file-loader', options: { name: 'main.css', }, }, ] },
Thanks for issue :+1:
@evilebottnawi Shall I provide a PR?
@4iAmAve no need, i already WIP on this :+1:
@evilebottnawi
Thanks a lot. That went fast. :)
Expected Behavior
The injected link tag should reference the correct link URL.
Actual Behavior
The passed
url
parameter into the link tag function is an esModule (for whatever reason) as follows:Hence the appended
<link />
child looks like this:No matter whether we use
import './main.css'
orrequire('./main.css');
in our component code. Evenimport styles from './main.css'
does not help.Code