diff --git a/test/__snapshots__/webpack-integration.test.js.snap b/test/__snapshots__/webpack-integration.test.js.snap index 86d2671e..e9fa3bbf 100644 --- a/test/__snapshots__/webpack-integration.test.js.snap +++ b/test/__snapshots__/webpack-integration.test.js.snap @@ -1,5 +1,20 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP +exports[`Webpack Integration Tests chunk-modules-nested-ordered-by-id 1`] = ` +"body { + margin: 0; + padding: 0; + font-family: sans-serif; +} +.block { + color: tomato; +} +.App { + color: black; +} +" +`; + exports[`Webpack Integration Tests chunk-modules-ordered-by-id 1`] = ` ".block { color: tomato; diff --git a/test/cases/chunk-modules-nested-ordered-by-id/a.js b/test/cases/chunk-modules-nested-ordered-by-id/a.js new file mode 100644 index 00000000..0e764ba2 --- /dev/null +++ b/test/cases/chunk-modules-nested-ordered-by-id/a.js @@ -0,0 +1,2 @@ +require('./b.txt'); +require('./a.txt'); diff --git a/test/cases/chunk-modules-nested-ordered-by-id/a.txt b/test/cases/chunk-modules-nested-ordered-by-id/a.txt new file mode 100644 index 00000000..b0fb26a3 --- /dev/null +++ b/test/cases/chunk-modules-nested-ordered-by-id/a.txt @@ -0,0 +1,3 @@ +.App { + color: black; +} diff --git a/test/cases/chunk-modules-nested-ordered-by-id/b.txt b/test/cases/chunk-modules-nested-ordered-by-id/b.txt new file mode 100644 index 00000000..6b0f2b45 --- /dev/null +++ b/test/cases/chunk-modules-nested-ordered-by-id/b.txt @@ -0,0 +1,3 @@ +.block { + color: tomato; +} diff --git a/test/cases/chunk-modules-nested-ordered-by-id/c.txt b/test/cases/chunk-modules-nested-ordered-by-id/c.txt new file mode 100644 index 00000000..b4cc7250 --- /dev/null +++ b/test/cases/chunk-modules-nested-ordered-by-id/c.txt @@ -0,0 +1,5 @@ +body { + margin: 0; + padding: 0; + font-family: sans-serif; +} diff --git a/test/cases/chunk-modules-nested-ordered-by-id/expected/file.css b/test/cases/chunk-modules-nested-ordered-by-id/expected/file.css new file mode 100644 index 00000000..688e1d43 --- /dev/null +++ b/test/cases/chunk-modules-nested-ordered-by-id/expected/file.css @@ -0,0 +1,11 @@ +body { + margin: 0; + padding: 0; + font-family: sans-serif; +} +.block { + color: tomato; +} +.App { + color: black; +} diff --git a/test/cases/chunk-modules-nested-ordered-by-id/index.js b/test/cases/chunk-modules-nested-ordered-by-id/index.js new file mode 100644 index 00000000..fbcd3875 --- /dev/null +++ b/test/cases/chunk-modules-nested-ordered-by-id/index.js @@ -0,0 +1,2 @@ +require('./c.txt'); +require('./a.js'); diff --git a/test/cases/chunk-modules-nested-ordered-by-id/webpack.config.js b/test/cases/chunk-modules-nested-ordered-by-id/webpack.config.js new file mode 100644 index 00000000..748732cc --- /dev/null +++ b/test/cases/chunk-modules-nested-ordered-by-id/webpack.config.js @@ -0,0 +1,10 @@ +import ExtractTextPlugin from '../../../src/index'; + +module.exports = { + entry: './index', + plugins: [ + new ExtractTextPlugin({ + filename: 'file.css', + }), + ], +};