Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
39b36e9
feat: ability to disable extract async modules
lsycxyj Jul 20, 2019
188cf5c
feat: ability to disable extract async modules, lint fix
lsycxyj Jul 20, 2019
4a7a1f6
feat: ability to disable extract async modules, add doc
lsycxyj Jul 20, 2019
399aa9a
feat: ability to disable extract async modules, ci fix
lsycxyj Jul 20, 2019
26646ae
feat: ability to disable extract async modules, order fix
lsycxyj Jul 20, 2019
08b8e52
feat: ability to disable extract async modules, wrong initial chunks fix
lsycxyj Jul 21, 2019
775cc0c
feat: ability to disable extract async modules, add manual test
lsycxyj Jul 21, 2019
f9d7df1
feat: ability to disable extract async modules, update lock file
lsycxyj Jul 21, 2019
c38cc8c
feat: ability to disable extract async modules, add tests for js files
lsycxyj Jul 21, 2019
e2177fd
feat: ability to disable extract modules, wip
lsycxyj Jul 22, 2019
4982afb
feat: ability to disable extract modules, remove duplicated dependencies
lsycxyj Jul 24, 2019
81517cc
feat: ability to disable extract modules, update doc
lsycxyj Jul 24, 2019
5b3fbef
feat: ability to disable extract modules, remove boolean type option
lsycxyj Jul 24, 2019
1da949e
feat: ability to disable extract modules, less code difference
lsycxyj Jul 24, 2019
e59a0e1
feat: ability to disable extract modules, less code difference
lsycxyj Jul 24, 2019
37ce619
Merge remote-tracking branch 'origin/feature/disable_async_20190719' …
lsycxyj Jul 24, 2019
6001569
feat: ability to disable extract modules, less regressions
lsycxyj Jul 26, 2019
b986c54
feat: ability to disable extract modules, ci fix
lsycxyj Jul 26, 2019
fa58310
feat: ability to disable extract modules, ci fix
lsycxyj Jul 26, 2019
5de6572
feat: ability to disable extract modules, replace private property
lsycxyj Jul 27, 2019
5b2c6d3
feat: ability to disable extract modules, remove useless code
lsycxyj Jul 31, 2019
2f29038
merge from master WIP
lsycxyj Feb 3, 2020
f0358d0
fix wrong modules after disable extraction
lsycxyj Feb 4, 2020
cbcfbc5
Merge remote-tracking branch 'upstream/master' into feature/disable_a…
lsycxyj Aug 6, 2020
40af212
fix wrong modification and update package-lock.json
lsycxyj Aug 6, 2020
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
Prev Previous commit
Next Next commit
feat: ability to disable extract async modules, add manual test
  • Loading branch information
lsycxyj committed Jul 21, 2019
commit 775cc0c4b4b1fea921bbd3fecde93150bc767130
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@
"npm-run-all": "^4.1.5",
"prettier": "^1.18.2",
"standard-version": "^6.0.1",
"style-loader": "^0.23.1",
"webpack": "^4.35.3",
"webpack-cli": "^3.3.6",
"webpack-dev-server": "^3.7.2"
Expand Down
1 change: 1 addition & 0 deletions test/manual/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
<p>Lazy CSS: Must be red, but turn green when <button class="lazy-button">pressing this button</button>.</p>
<p>But turn orange, when <button class="lazy-button2">pressing this button</button>. Additional clicks have no effect.</p>
<p>Refresh and press buttons in reverse order: This should turn green instead.</p>
<p class="async-disabled">This should turn yellow after pressing "lazy-button" without loading extra css file containing "async-disabled.css".</p>
</div>
<div class="test lazy-failure-css">
<p>Lazy CSS: Turn off the network and <button class="lazy-failure-button">press this button</button>.</p>
Expand Down
3 changes: 3 additions & 0 deletions test/manual/src/async-disabled.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.async-disabled {
background: yellow;
}
1 change: 1 addition & 0 deletions test/manual/src/lazy.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* eslint-env browser */

import './lazy.css';
import './async-disabled.css';
9 changes: 8 additions & 1 deletion test/manual/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,21 @@ module.exports = {
rules: [
{
test: /\.css$/,
use: [Self.loader, 'css-loader'],
use: ['style-loader', Self.loader, 'css-loader'],
},
],
},
plugins: [
new Self({
filename: '[name].css',
chunkFilename: '[contenthash].css',
disableAsync({ module }) {
let ret = false;
if (module.content.indexOf('async-disabled') > -1) {
ret = true;
}
return ret;
},
}),
],
devServer: {
Expand Down