Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions src/loader.js
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ export function pitch(request) {
)}`;

this.importModule(
`${this.resourcePath}.webpack[javascript/auto]!=!${request}`,
`${this.resourcePath}.webpack[javascript/auto]!=!!!${request}`,
{
layer: options.layer,
publicPath: publicPathForExtract,
Expand Down Expand Up @@ -366,4 +366,6 @@ export function pitch(request) {
}

// eslint-disable-next-line func-names
export default function () {}
export default function (content) {
console.log(content);
}
4 changes: 4 additions & 0 deletions test/cases/ignore-other-loaders/expected/main.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
body {
background: red;
}

1 change: 1 addition & 0 deletions test/cases/ignore-other-loaders/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
import "./style.css";
3 changes: 3 additions & 0 deletions test/cases/ignore-other-loaders/other.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.color {
color: red;
}
3 changes: 3 additions & 0 deletions test/cases/ignore-other-loaders/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
body {
background: red;
}
23 changes: 23 additions & 0 deletions test/cases/ignore-other-loaders/webpack.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import Self from "../../../src";

module.exports = {
entry: "./index.js",
module: {
rules: [
{
test: /\.css|\.less$/,
use: [
{
loader: Self.loader,
},
"css-loader",
],
},
],
},
plugins: [
new Self({
filename: "[name].css",
}),
],
};