#build #nuxt.js
#строить #nuxt.js
Вопрос:
Проблема:- Изображения не загружались при создании моего приложения nuxt, оно хорошо работало, когда я развернул его в netlify, и на моей другой машине изображение загружалось правильно, но один файл JS не загружался, и он связан с одним пакетом
Структура
- активы
- Шрифты
- Изображения
- страницы
- индекс.vue
- статический
- фавикон.ico
- vues
- // все компоненты
- .editorconfig
- nuxt.config.js
- пакет.json
nuxt.config.js
export default { // Global page headers: https://go.nuxtjs.dev/config-head head: { title: 'test-app', htmlAttrs: { lang: 'en' }, meta: [ { charset: 'utf-8' }, { name: 'viewport', content: 'width=device-width, initial-scale=1' }, { hid: 'description', name: 'description', content: '' }, { name: 'format-detection', content: 'telephone=no' } ], link: [ { rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' } ] }, // Global CSS: https://go.nuxtjs.dev/config-css css: [ ], // Plugins to run before rendering page: https://go.nuxtjs.dev/config-plugins plugins: [ ], ssr: true, target: "static", // Auto import components: https://go.nuxtjs.dev/config-components components: true, // Modules for dev and build (recommended): https://go.nuxtjs.dev/config-modules buildModules: [ ], // Modules: https://go.nuxtjs.dev/config-modules modules: [ // https://go.nuxtjs.dev/bootstrap 'bootstrap-vue/nuxt', ], // Build Configuration: https://go.nuxtjs.dev/config-build build: { babel: { compact: true, } } }
package.json
{ "name": "test-app", "version": "1.0.0", "private": true, "scripts": { "dev": "nuxt", "build": "nuxt build", "start": "nuxt start", "generate": "nuxt generate" }, "dependencies": { "@babel/polyfill": "^7.11.5", "@babel/preset-env": "^7.12.17", "bootstrap": "^4.6.0", "bootstrap-vue": "^2.21.2", "core-js": "^3.15.1", "nuxt": "^2.15.7", "mutationobserver-shim": "^0.3.7", "popper.js": "^1.16.1", "portal-vue": "^2.1.7", "vue-slick-carousel": "^1.0.6" }, "devDependencies": { "node-sass": "^6.0.1", "sass": "^1.26.11", "sass-loader": "^10.2.0", "vue-cli-plugin-bootstrap-vue": "~0.8.2" } }
Комментарии:
1. Привет, я не уверен, что понимаю, что не работает. Не могли бы вы сформулировать это как-нибудь по-другому?