-
Notifications
You must be signed in to change notification settings - Fork 512
refactor: pass a unique compiler name to get child compilation (webpack 3) #483
Conversation
This is recommended after webpack/webpack#4704
Codecov Report
@@ Coverage Diff @@
## master #483 +/- ##
==========================================
- Coverage 90.38% 90.22% -0.17%
==========================================
Files 6 6
Lines 364 358 -6
Branches 77 75 -2
==========================================
- Hits 329 323 -6
Misses 35 35
Continue to review full report at Codecov.
|
i've installed extract-text-webpack-plugin and webpack from these commits but i still get the error:
here's the repository to test: https://github.com/bstuff/require-styles-webpack HtmlWebpackPlugin Template:<html>
<head></head>
<body>
<div class="header">Some template stuff</div>
${require('./body')}
</body>
</html> body/index.js:import style from './style.styl'; // this line causes the error
import tpl from './tpl.html';
export default tpl; |
Note to @webpack-contrib/org-maintainers - Should be done in conjunction with #477 as a single |
@bstuff It's not automatically fixed. This webpack PR only allow to use the rules: [
{ test: /\.css$/, oneOf: [
{ compiler: "html-webpack-plugin", loader: "null-loader" },
{ use: ETP.extract(...) }
] }
] |
btw. html-webpack-plugin can do a similar change for webpack 3. cc @jantimon |
- refactor: Pass a unique compiler name to get child compilation [483](#483) - refactor: Apply webpack-defaults [542](#542) BREAKING CHANGE: Enforces `engines` of `"node": ">=4.3.0 < 5.0.0 || >= 5.10` - refactor: DeprecationWarning: Chunk.modules [543](#543) BREAKING CHANGE: Updates to `Chunk.mapModules`. This release is not backwards compatible with `Webpack 2.x` due to breaking changes in webpack/webpack#4764 - fix: css generation order issue see: webpack/webpack#5225 BREAKING CHANGE: Enforces `peerDependencies` of `"webpack": "^3.1.0"`.
Hi guys, The rules-section looks like this: // CSS LOADER
, {
test: /\.css$/
, use: ['css-to-string-loader'].concat(
ExtractTextPlugin.extract({
fallback: 'style-loader'
, use: ['css-loader']
})
)
} How ca I implement the above "oneOf" workaround into my loader config? Thanks. |
@marmelin remove |
Thanks, now without In config file :
as merged object in Config-object output :
Error is still the same.
PS:Change config and passing compiler option, does not change anything:
QUESTION for clarity:Is the "_filename" in /extract-text-webpack-plugin/dist/loader.js:42:59 the one from the config ...
... or is this the "index.html" from html-webpack-plugin, which should be generated first? Greetings. |
@marmelin I met the same problem, do you have any solution finally, thanks. |
Hi @kimown , See my repo here:marmelin/ngtools-webpack-error-message-undefined, where I solved the error and explain it. It boils down to this:
This is what I did and it solved the error! |
This is recommended after webpack/webpack#4704
It's not good to merge before this PR because it would create absolute paths in the records.
Closes #389