mirror of
https://github.com/kiwix/kiwix-js-pwa.git
synced 2025-09-10 04:40:27 -04:00
Fix quote detection in rollup.js
This commit is contained in:
parent
fea9b97456
commit
32bc075f66
@ -63,11 +63,11 @@ if (process.env.BUILD === 'production') {
|
|||||||
// Replace the entry point with the bundle
|
// Replace the entry point with the bundle
|
||||||
.replace(/(www[\\/]js[\\/])app.js/, '$1bundle.min.js')
|
.replace(/(www[\\/]js[\\/])app.js/, '$1bundle.min.js')
|
||||||
// Remove all the lib files that will be included in the bundle
|
// Remove all the lib files that will be included in the bundle
|
||||||
.replace(/(?:<Content Include=)?"www[\\/]js[\\/]lib[\\/]cache[\s\S]+zimfile.js"(?:\s*\/>|,)\s*/, '')
|
.replace(/(?:<Content Include=)?['"]www[\\/]js[\\/]lib[\\/]cache[\s\S]+zimfile.js['"](?:\s*\/>|,)\s*/, '')
|
||||||
// Alter remaining lib references
|
// Alter remaining lib references
|
||||||
.replace(/([\\/])js[\\/]lib/g, '$1js')
|
.replace(/([\\/])js[\\/]lib/g, '$1js')
|
||||||
// Remove unneeded ASM/WASM binaries
|
// Remove unneeded ASM/WASM binaries
|
||||||
.replace(/"www[\\/]js[\\/].*dec.*js",\s*/g, '')
|
.replace(/['"]www[\\/]js[\\/].*dec.*js['"],\s*/g, '')
|
||||||
},
|
},
|
||||||
{ src: 'www/index.html', dest: 'dist/www',
|
{ src: 'www/index.html', dest: 'dist/www',
|
||||||
// Link the html to the new bundle entry point
|
// Link the html to the new bundle entry point
|
||||||
@ -95,11 +95,11 @@ if (process.env.BUILD === 'production') {
|
|||||||
// Replace the entry point with the bundle
|
// Replace the entry point with the bundle
|
||||||
.replace(/(www[\\/]js[\\/])app.js/, '$1bundle.js')
|
.replace(/(www[\\/]js[\\/])app.js/, '$1bundle.js')
|
||||||
// Remove all the lib files that will be included in the bundle
|
// Remove all the lib files that will be included in the bundle
|
||||||
.replace(/(?:<Content Include=)?"www[\\/]js[\\/]lib[\\/]cache[\s\S]+zimfile.js"(?:\s*\/>|,)\s*/, '')
|
.replace(/(?:<Content Include=)?['"]www[\\/]js[\\/]lib[\\/]cache[\s\S]+zimfile.js['"](?:\s*\/>|,)\s*/, '')
|
||||||
// Alter remaining lib references
|
// Alter remaining lib references
|
||||||
.replace(/([\\/])js[\\/]lib/g, '$1js')
|
.replace(/([\\/])js[\\/]lib/g, '$1js')
|
||||||
// Remove unneeded ASM/WASM binaries
|
// Remove unneeded ASM/WASM binaries
|
||||||
.replace(/"www[\\/]js[\\/].*dec.*js",\s*/g, '')
|
.replace(/['"]www[\\/]js[\\/].*dec.*js['"],\s*/g, '')
|
||||||
},
|
},
|
||||||
{ src: 'www/index.html', dest: 'dist/www',
|
{ src: 'www/index.html', dest: 'dist/www',
|
||||||
// Link the html to the new bundle entry point
|
// Link the html to the new bundle entry point
|
||||||
|
Loading…
x
Reference in New Issue
Block a user