Vue.js VueJS更改index.html中脚本文件的链接
我用VueJS创建了一个简单的应用程序,并在平台上运行它 不幸的是,找不到JS文件 index.html在此处搜索:Vue.js VueJS更改index.html中脚本文件的链接,vue.js,webpack,vue-cli,Vue.js,Webpack,Vue Cli,我用VueJS创建了一个简单的应用程序,并在平台上运行它 不幸的是,找不到JS文件 index.html在此处搜索: http://homepage.de:8080/static/js/app.b22ce679862c47a75225.js 但文件在这里: http://homepage.de:8080/app_direct/vue/static/js/app.b22ce679862c47a75225.js 是否有方法更改文件中的某些参数以链接到正确的源 我使用这种老方法来创建我的vue应
http://homepage.de:8080/static/js/app.b22ce679862c47a75225.js
但文件在这里:
http://homepage.de:8080/app_direct/vue/static/js/app.b22ce679862c47a75225.js
是否有方法更改文件中的某些参数以链接到正确的源
我使用这种老方法来创建我的vue应用程序,如果它重要的话(我没有vue config.js
)
然后,我使用此Dockerfile对其进行dockerize:
FROM node:lts-alpine
# install simple http server for serving static content
RUN npm install -g http-server
# make the 'app' folder the current working directory
WORKDIR /app
# copy both 'package.json' and 'package-lock.json' (if available)
COPY package*.json ./
# install project dependencies
RUN npm install
# copy project files and folders to the current working directory (i.e. 'app' folder)
COPY . .
# build app for production with minification
RUN npm run build
EXPOSE 8080
CMD [ "http-server", "dist" ]
是否需要查找BaseUrl的配置我在哪里可以找到它?可能需要将web服务器根目录设置为应用程序根目录
FROM node:lts-alpine
# install simple http server for serving static content
RUN npm install -g http-server
# make the 'app' folder the current working directory
WORKDIR /app
# copy both 'package.json' and 'package-lock.json' (if available)
COPY package*.json ./
# install project dependencies
RUN npm install
# copy project files and folders to the current working directory (i.e. 'app' folder)
COPY . .
# build app for production with minification
RUN npm run build
EXPOSE 8080
CMD [ "http-server", "dist" ]