Missing [path] in module.less files [webpack 4]
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 35/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 停滞
- 技術スタック
- javascript
- 領域
- build-system, frontend
調査の方向性
示されている style-loader、css-loader、postcss-loader、less-loader の設定を使って、my.module.less の webpack 4.1.1 の出力を再現してください。生成されたモジュールの出力と localIdentName の扱いを以前の出力と比較してください。完了条件は、[path] が loader chain によって省略されるかどうかを確認し、その挙動がバグである場合は回帰テストを追加または特定することです。
索引モデルが issue の本文から書いたものです。
説明
my.module.less in chrome devtools
Before webpack 4.1.1
var escape = require("../../../node_modules/css-loader/lib/url/escape.js");
exports = module.exports = require("../../../node_modules/css-loader/lib/css-base.js")(true);
// imports
// module
exports.push([module.id, ".app-controllers-___header-module__header___...snip
// exports
exports.locals = {
"header": "app-controllers-___header-module__header___2cDAd",
"link": "app-controllers-___header-module__link___9ZF3f",
"title": "app-controllers-___header-module__title___3zdsk",
"versionName": "app-controllers-___header-module__versionName___P3mUm",
"loggedInUser": "app-controllers-___header-module__loggedInUser___2g4NC",
"settingsAndInfo": "app-controllers-___header-module__settingsAndInfo___3tMjw",
"usernameLabel": "app-controllers-___header-module__usernameLabel___12VlL",
"userOptionsList": "app-controllers-___header-module__userOptionsList___392Md",
"userOptionsListItem": "app-controllers-___header-module__userOptionsListItem___1axLL",
"readonlyLabel": "app-controllers-___header-module__readonlyLabel___3TM1g",
"outdatedStyle": "app-controllers-___header-module__outdatedStyle___1Hj_P",
"outdatedLink": "app-controllers-___header-module__outdatedLink___3w-ME"
};
After webpack 4.1.1:
var escape = require("../../../node_modules/css-loader/lib/url/escape.js");
exports = module.exports = require("../../../node_modules/css-loader/lib/css-base.js")(true);
// imports
// module
exports.push([module.id, ".___header-module__header_...snip
// exports
exports.locals = {
"header": "___header-module__header___2hFEv",
"link": "___header-module__link___3788-",
"title": "___header-module__title___1ltkk",
"versionName": "___header-module__versionName___PiO_N",
"loggedInUser": "___header-module__loggedInUser___3rJB5",
"settingsAndInfo": "___header-module__settingsAndInfo___3En63",
"usernameLabel": "___header-module__usernameLabel___2IGNx",
"userOptionsList": "___header-module__userOptionsList___NyxVd",
"userOptionsListItem": "___header-module__userOptionsListItem___3U7ZZ",
"readonlyLabel": "___header-module__readonlyLabel___1XVj-",
"outdatedStyle": "___header-module__outdatedStyle___2aBI2",
"outdatedLink": "___header-module__outdatedLink___3RjtB"
};
My rule:
{
test: /\.module\.less$/,
use: [
{
loader: "style-loader",
options: { sourceMap: true }
},
{
loader: "css-loader",
options: {
sourceMap: true,
modules: true,
importLoaders: 1,
localIdentName: "[path]___[name]__[local]___[hash:base64:5]"
}
},
{
loader: "postcss-loader",
options: {
sourceMap: true,
plugins: loader => [
require("postcss-import")({
root: loader.resourcePath
}),
require("postcss-cssnext")({
warnForDuplicates: false
}),
require("postcss-csso")({
zindex: false
})
]
}
// publicPath: ""
},
{
loader: "less-loader",
options: { sourceMap: true }
}
]
};
I'm guessing here that [path] is the item missing in the output.
Any thoughts? Is this a bug?
- 主要言語
- JavaScript
- スター
- 2k
- フォーク
- 159
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
gajus/babel-plugin-react-css-modules のほかの issue
-
難易度 3/5 1〜2日 初心者へのやさしさ 35/100
-
難易度 3/5 1〜2日 初心者へのやさしさ 35/100
gajus/babel-plugin-react-css-modules#309 · リアクション 1 件 ·
-
doesn't work with windicss対応中かも @lili21 が 1776 日前に担当しました。 オープン
難易度 3/5 1〜2日 初心者へのやさしさ 35/100
-
難易度 3/5 1〜2日 初心者へのやさしさ 20/100
gajus/babel-plugin-react-css-modules#306 · コメント 1 件 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 35/100
gajus/babel-plugin-react-css-modules#304 · コメント 7 件 · リアクション 1 件 ·
gajus/babel-plugin-react-css-modules の issue をすべて見る
似ている issue
-
enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
ericcornelissen/depreman#591 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
NanmiCoder/dsh-agent-teams#269 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 65/100
メンテナーはふだん 1 日以内に返信
-
docs
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
idean3885/claude-ops-agent#765 ·
メンテナーはふだん 1 日以内に返信
-
docs html v6
難易度 1/5 1時間未満 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信