-
-
Notifications
You must be signed in to change notification settings - Fork 389
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: prefetch and preload runtime generation (#1116)
- Loading branch information
1 parent
00cdedb
commit 58c6b74
Showing
6 changed files
with
33 additions
and
2 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
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,3 @@ | ||
.a { | ||
color: red; | ||
} |
Empty file.
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,4 @@ | ||
.a { | ||
color: red; | ||
} | ||
|
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,3 @@ | ||
import "./a.css"; | ||
|
||
import(/* webpackPrefetch: true */ "./b"); |
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,21 @@ | ||
import webpack from "webpack"; | ||
|
||
import Self from "../../../src"; | ||
|
||
module.exports = { | ||
entry: "./index.js", | ||
module: { | ||
rules: [ | ||
{ | ||
test: /\.css$/, | ||
use: [Self.loader, "css-loader"], | ||
}, | ||
], | ||
}, | ||
plugins: [ | ||
new Self({ | ||
filename: "[name].css", | ||
}), | ||
new webpack.HotModuleReplacementPlugin(), | ||
], | ||
}; |