FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
webpack/examples/code-splitted-require.context/example.js at main · supereact/webpack · GitHub
supereact
/
webpack
Public
forked from
webpack/webpack
Notifications
You must be signed in to change notification settings
Fork
0
Star
2
Code
Pull requests
0
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
webpack
/
examples
/
code-splitted-require.context
/
example.js
Copy path
More file actions
More file actions
Latest commit
History
History
History
11 lines (11 loc) · 266 Bytes
Breadcrumbs
webpack
/
examples
/
code-splitted-require.context
/
example.js
Copy path
File metadata and controls
11 lines (11 loc) · 266 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
function
getTemplate
(
templateName
,
callback
)
{
require
.
ensure
(
[
]
,
function
(
require
)
{
callback
(
require
(
"../require.context/templates/"
+
templateName
)
(
)
)
;
}
)
;
}
getTemplate
(
"a"
,
function
(
a
)
{
console
.
log
(
a
)
;
}
)
;
getTemplate
(
"b"
,
function
(
b
)
{
console
.
log
(
b
)
;
}
)
;
Back
|
FazBrowse Home
|
New Git URL