-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
replace-relative-paths error #2
Comments
If you use windows terminal, you probably encounter these three errors:
That's how I solved it:
var replace = require('replace');
replace({
regex: '/nuxtfiles/',
replacement: 'nuxtfiles/',
paths: ['dist'],
recursive: true,
silent: true,
});
replace({
regex: '/assets/',
replacement: 'nuxtfiles/',
paths: ['dist'],
recursive: true,
silent: true,
});
replace({
regex: '(href|src|\"href\"|\"src\")=\"/',
replacement: '$1=\"../',
paths: ['dist'],
recursive: true,
silent: true,
});
replace({
regex: '(href|src|\"href\"|\"src\"):\"/',
replacement: '$1:\"../',
paths: ['dist'],
recursive: true,
silent: true,
});
change replace-relative-paths key for:
npm run cordova-win Enjoy! :D b.t.w. Thanks for the awesome nuxtjs-cordova template! |
Wonderful! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
npm ERR! cordova-nuxt-demo@1.0.0 replace-relative-paths:
replace '/nuxtfiles/' 'nuxtfiles/' dist --recursive && replace '/assets/' 'nuxtfiles/' dist --recursive && replace '(href|src|"href"|"src")="/' '$1="../' dist --recursive && replace '(href|src|"href"|"src"):"/' '$1:"../' dist --recursive
'src' is not recognized as an internal or external command,
The text was updated successfully, but these errors were encountered: