menci / vite-plugin-public-path Goto Github PK
View Code? Open in Web Editor NEWVite's equivalent of `__webpack_public_path__` in Webpack. Works for `index.html` and modern/legacy build.
License: MIT License
Vite's equivalent of `__webpack_public_path__` in Webpack. Works for `index.html` and modern/legacy build.
License: MIT License
Will you upate this plugin to support latest version 3.2.4?
Currently the peerDependencies is still '^2.8':
"peerDependencies": {
"vite": "^2.8"
},
Hey!
I've got a use case where I'm dependent on certain external scripts being included in the initial DOM, in <head>
. This plugin removes those script tags from the DOM and dynamically adds them back to the document body, which unfortunately breaks the page.
What is the purpose of rewriting external script tags? They will never be impacted by the public path, so why rewrite them?
On my project build was working fine
But as soon as I added this plugin the build is failing for me with error memory allocation of 268435456 bytes failed
and now I need to add NODE_OPTIONS=--max_old_space_size=8192
on my local.
publicPath({
// A JS expression evaluates on client side each time when loading a new file
// Should evaluate to a string ending with "/"
publicPathExpression: "window.publicPath",
html: true,
// uncomment if needed
// excludeScripts: /^https:.*systemjs/
}),
As the app is build via Github actions running which have memory of 7GB, its always failing. Even setting the max-old-space-size does not work there for windows env.
Can you give an example of how to create "header" tag in index.html refer to this description?
You should initialize this expression's value (i.e. assign to it if it's a global variable or declare the function if it's calling one) in a <script> tag in <head>. We will start creating <link> tags after the last <script> tag in your <head>.
'
I have tried a lot of ways, but none of them worked.
Thank you.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.