Closed aidnurs closed 5 years ago
Issue is resolved. Just returned app.js in functions.php
function load_vue_scripts() {
wp_enqueue_style('blankslate/app.css', get_template_directory_uri() . '/dist/styles/app.css', false, null);
wp_enqueue_script('blankslate/manifest.js', get_template_directory_uri() . '/dist/scripts/manifest.js', null, null, true);
wp_enqueue_script('blankslate/vendor.js', get_template_directory_uri() . '/dist/scripts/vendor.js', null, null, true);
wp_enqueue_script('blankslate/app.js', get_template_directory_uri() . '/dist/scripts/app.js', null, null, true);
}
Hey, I'm trying to replace js with ts, but there are no terminal errors and I get a blank page.
What I made:
npm install typescript ts-loader --save-dev
changed name from "app.js" to "app.ts"
in "webpack.mix.js" added
added tsconfig.json file to main folder
added vue-shim.d.ts file to main folder
app.ts and App.vue
import App from "./App.vue";
new Vue({ el: "#app", render: h => h(App) });