Answer the question
In order to leave comments, you need to log in
How to make a separate file for settings when building vue cli?
when vue-cli is built, everything is merged into one file.
how to leave one file after assembly so that you can add your own variables to it?
Answer the question
In order to leave comments, you need to log in
I will assume that you have the default build settings using vue-cli, then
put a separate js file in the public/js folder
const MY_APP_CONFIG = {
setting: 'value',
}
window.MY_APP_CONFIG = MY_APP_CONFIG; // ложим в глобальный объект наши настройки
<script>
export default {
data() {
return {
config: window.MY_APP_CONFIG,
};
},
created() {
console.dir(this.config);
},
}
</script>
странная регулярка . У вас не заэкранирован символ / в символьном классе. а что искать то она должна ? пока что она только способна доктайп найти...
preg_match('@<meta.*og:image.*?(http:\/\/.*?)"\s+\/>@i',$k, $matches);
$host = $matches[1];
echo $host;
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question