https://teratail.com/questions/188386?modal=q-comp
の続きです。
現在、自分のvue.config.js設定は以下の通りです。
pages: { index: { // entry for the page entry: "src/vue/app/main.js", // the source template template: "src/vue/app/public/index.html" } }
npm run serve
してlocalhost:8080
にアクセスすると
src/vue/app/public/index.htmlにアクセスしますが、
/public/a/index.html /public/b/index.html
のようなファイルを作って
locahost:8080/a
にアクセスすると、localhost:8080にアクセスしたことと同じことを実現させたいです。
そのため、自分は
npm run build
によって生成された/dist/js/chunk-vendors.aa37f26b.js
ファイルをindex.htmlに読み込んでおくと、すんなり動くと思いましたが、
Uncaught SyntaxError: Unexpected token <
のようなエラーが出て真っ白の画面になりました。
正確には以下のようなindex.htmlにしました。
<head> <script src="/dist/js/chunk-vendors.aa37f26b.js"></script> </head> <body> <div id="app"></div> </body>
なにか自分が見逃してる点がありましたらご教示いただけますでしょうか。
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。