Skip to content

Commit

Permalink
fix: conflict multiple asset error (#194)
Browse files Browse the repository at this point in the history
* fix: conflict multiple asset error

* fix: modify to work well in mode:'none'

* test: add contenthash-multiple-entries test code

* fix: remove change, cleanup test, upgrade webpack version
  • Loading branch information
unchai authored and evilebottnawi committed Jun 29, 2018
1 parent e00bcda commit 1023d22
Show file tree
Hide file tree
Showing 13 changed files with 51 additions and 0 deletions.
2 changes: 2 additions & 0 deletions test/cases/contenthash-multiple-entries/entryA.js
@@ -0,0 +1,2 @@
import "./styleA.css";
import "./styleB.css";
1 change: 1 addition & 0 deletions test/cases/contenthash-multiple-entries/entryB.js
@@ -0,0 +1 @@
import "./styleA.css";
Empty file.
2 changes: 2 additions & 0 deletions test/cases/contenthash-multiple-entries/entryD.js
@@ -0,0 +1,2 @@
import "./styleA.css";
import "./styleB.css";
2 changes: 2 additions & 0 deletions test/cases/contenthash-multiple-entries/entryE.js
@@ -0,0 +1,2 @@
import "./styleC.css";
import "./styleD.css";
@@ -0,0 +1,4 @@
.styleA { background: red; }

.styleB { background: blue; }

@@ -0,0 +1,4 @@
.styleA { background: red; }

.styleB { background: blue; }

@@ -0,0 +1,2 @@
.styleA { background: red; }

1 change: 1 addition & 0 deletions test/cases/contenthash-multiple-entries/styleA.css
@@ -0,0 +1 @@
.styleA { background: red; }
1 change: 1 addition & 0 deletions test/cases/contenthash-multiple-entries/styleB.css
@@ -0,0 +1 @@
.styleB { background: blue; }
1 change: 1 addition & 0 deletions test/cases/contenthash-multiple-entries/styleC.css
@@ -0,0 +1 @@
.styleA { background: red; }
1 change: 1 addition & 0 deletions test/cases/contenthash-multiple-entries/styleD.css
@@ -0,0 +1 @@
.styleB { background: blue; }
30 changes: 30 additions & 0 deletions test/cases/contenthash-multiple-entries/webpack.config.js
@@ -0,0 +1,30 @@
const Self = require('../../../');

module.exports = {
entry: {
'entryA': './entryA.js',
'entryB': './entryB.js',
'entryC': './entryC.js',
'entryD': './entryD.js',
'entryE': './entryE.js',
},
module: {
rules: [
{
test: /\.css$/,
use: [
Self.loader,
'css-loader',
],
},
],
},
output: {
filename: '[name]-[contenthash].js',
},
plugins: [
new Self({
filename: '[contenthash].css',
}),
],
};

0 comments on commit 1023d22

Please sign in to comment.