Comments (4)
This should be working by default. But I will review and post here the results.
from vue-electron-template.
Thanks a lot.
Your second solution works fine.
new ScriptExtHtmlWebpackPlugin({
async: /\.js$/,
prefetch: {
test: /\.js$/,
chunks: 'async'
}
})
from vue-electron-template.
Confirmed. There are two use cases;
- If the asset you want to prefetch is an static asset, place it in
static
directory and link it inindex.html
<link rel="prefetch" href="./static/login-modal-chunk.js">
- If asset is dynamic (means requires compilation sass, js etc) then:
update your import:
import("LoginModal")
to:
import(/* webpackPrefetch: true */ "LoginModal")
^ it will prefetch the asset.
- Another more customizable option is to use this web-pack plugin:
https://github.com/numical/script-ext-html-webpack-plugin
I Hope this helps.
from vue-electron-template.
Great! 👍
from vue-electron-template.
Related Issues (20)
- Update dependent packages? HOT 3
- lang=scss in vue single file component cause Module build failed HOT 2
- Vue 3 support?? HOT 1
- npm run pack:web failes with Module not found HOT 3
- Status of this project? HOT 3
- Add `--debug` flag support for production build
- Add build for web HOT 8
- Customizing app Icon from default HOT 2
- Question about workers HOT 1
- Include Express.js HOT 3
- Works well in dev mode, build successfully but can't launch after building. HOT 5
- console.log() not printing HOT 6
- trojan in node_modules... HOT 1
- Disable or customize Context menu HOT 10
- Modify src/main causes multiple electron on reload HOT 9
- An unhandled error occurred inside electron-build HOT 2
- Using Typescript in vue components HOT 3
- Error when npm install HOT 2
- main process hot reload cause duplicated windows HOT 2
- Vue 3 support? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vue-electron-template.