Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Test watching modules included in a ConcatenatedModule
ModuleConcatenationPlugin creates a ConcatenatedModule from harmony modules. It must be rebuilt when those modules change.
- Loading branch information
Showing
11 changed files
with
32 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export default 'This '; |
5 changes: 5 additions & 0 deletions
5
test/watchCases/plugins/module-concatenation-plugin/0/bar/abc.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import a from './a'; | ||
import b from './b'; | ||
import c from './c'; | ||
|
||
export default a + b + c; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export default 'is only'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export default ' a test'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
module.exports = require('../bar/abc').default + '.0'; |
13 changes: 13 additions & 0 deletions
13
test/watchCases/plugins/module-concatenation-plugin/0/index.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
it("should watch for changes", function() { | ||
if(WATCH_STEP === '0') { | ||
require("./foo/" + WATCH_STEP).should.be.eql('This is only a test.' + WATCH_STEP); | ||
} | ||
else if(WATCH_STEP === '1') { | ||
require("./foo/" + WATCH_STEP).should.be.eql('This should be a test.' + WATCH_STEP); | ||
} | ||
else if(WATCH_STEP === '2') { | ||
require("./foo/" + WATCH_STEP).should.be.eql('This should be working.' + WATCH_STEP); | ||
} | ||
|
||
STATS_JSON.modules.length.should.equal(4 + Number(WATCH_STEP)); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export default 'should be'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
module.exports = require('../bar/abc').default + '.1'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export default ' working'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
module.exports = require('../bar/abc').default + '.2'; |
6 changes: 6 additions & 0 deletions
6
test/watchCases/plugins/module-concatenation-plugin/webpack.config.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
var webpack = require("../../../../"); | ||
module.exports = { | ||
plugins: [ | ||
new webpack.optimize.ModuleConcatenationPlugin() | ||
] | ||
}; |