Skip to content

Commit

Permalink
test: fix invalid test and source map test (#481)
Browse files Browse the repository at this point in the history
  • Loading branch information
evilebottnawi authored Dec 25, 2019
1 parent b197757 commit aa22e44
Show file tree
Hide file tree
Showing 5 changed files with 38 additions and 3 deletions.
4 changes: 4 additions & 0 deletions test/cases/no-source-map/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/no-source-map/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/no-source-map/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
body {
background: red;
}
30 changes: 30 additions & 0 deletions test/cases/no-source-map/webpack.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
import Self from '../../../src';

module.exports = {
entry: './index.js',
// Required to disable source maps in webpack@4
devtool: false,
module: {
rules: [
{
test: /\.css$/,
use: [
{
loader: Self.loader,
},
{
loader: 'css-loader',
options: {
sourceMap: false,
},
},
],
},
],
},
plugins: [
new Self({
filename: '[name].css',
}),
],
};
3 changes: 0 additions & 3 deletions test/cases/source-map/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,6 @@ module.exports = {
use: [
{
loader: Self.loader,
options: {
sourceMap: true,
},
},
{
loader: 'css-loader',
Expand Down

0 comments on commit aa22e44

Please sign in to comment.