Why the App container is empty when a move my project in a subfolder using Vue js 2.5?
up vote
0
down vote
favorite
I built the project and moved it to a subfolder
the only changes
/config/index.js
'use strict'
// Template version: 1.3.1
// see http://vuejs-templates.github.io/webpack for documentation.
const path = require('path')
module.exports = {
dev: {
// Paths
assetsSubDirectory: 'static',
assetsPublicPath: '/',
proxyTable: {},
// Various Dev Server settings
host: 'localhost', // can be overwritten by process.env.HOST
port: 8080, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined
autoOpenBrowser: false,
errorOverlay: true,
notifyOnErrors: true,
poll: false, // https://webpack.js.org/configuration/dev-server/#devserver-watchoptions-
// Use Eslint Loader?
// If true, your code will be linted during bundling and
// linting errors and warnings will be shown in the console.
useEslint: false,
// If true, eslint errors and warnings will also be shown in the error overlay
// in the browser.
showEslintErrorsInOverlay: false,
/**
* Source Maps
*/
// https://webpack.js.org/configuration/devtool/#development
devtool: 'cheap-module-eval-source-map',
// If you have problems debugging vue-files in devtools,
// set this to false - it *may* help
// https://vue-loader.vuejs.org/en/options.html#cachebusting
cacheBusting: true,
cssSourceMap: true
},
build: {
// Template for index.html
index: path.resolve(__dirname, '../dist/index.html'),
// Paths
assetsRoot: path.resolve(__dirname, '../dist'),
assetsSubDirectory: 'static',
assetsPublicPath: '/',
/**
* Source Maps
*/
productionSourceMap: false,
// https://webpack.js.org/configuration/devtool/#production
devtool: '#source-map',
// Gzip off by default as many popular static hosts such as
// Surge or Netlify already gzip all static assets for you.
// Before setting to `true`, make sure to:
// npm install --save-dev compression-webpack-plugin
productionGzip: false,
productionGzipExtensions: ['js', 'css'],
// Run the build command with an extra argument to
// View the bundle analyzer report after build finishes:
// `npm run build --report`
// Set to `true` or `false` to always turn it on or off
bundleAnalyzerReport: process.env.npm_config_report
}
}
using vue-router I setup the path
/src/router/index.js
routes: [
{
path: './',
name: 'Main',
component: Main
}
]
when I checked the subfolder it seems to loads the assets but the app container is empty
I'm not sure if this is something that I should fix on vue or webpack
javascript webpack vuejs2 vue-router html-webpack-plugin
add a comment |
up vote
0
down vote
favorite
I built the project and moved it to a subfolder
the only changes
/config/index.js
'use strict'
// Template version: 1.3.1
// see http://vuejs-templates.github.io/webpack for documentation.
const path = require('path')
module.exports = {
dev: {
// Paths
assetsSubDirectory: 'static',
assetsPublicPath: '/',
proxyTable: {},
// Various Dev Server settings
host: 'localhost', // can be overwritten by process.env.HOST
port: 8080, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined
autoOpenBrowser: false,
errorOverlay: true,
notifyOnErrors: true,
poll: false, // https://webpack.js.org/configuration/dev-server/#devserver-watchoptions-
// Use Eslint Loader?
// If true, your code will be linted during bundling and
// linting errors and warnings will be shown in the console.
useEslint: false,
// If true, eslint errors and warnings will also be shown in the error overlay
// in the browser.
showEslintErrorsInOverlay: false,
/**
* Source Maps
*/
// https://webpack.js.org/configuration/devtool/#development
devtool: 'cheap-module-eval-source-map',
// If you have problems debugging vue-files in devtools,
// set this to false - it *may* help
// https://vue-loader.vuejs.org/en/options.html#cachebusting
cacheBusting: true,
cssSourceMap: true
},
build: {
// Template for index.html
index: path.resolve(__dirname, '../dist/index.html'),
// Paths
assetsRoot: path.resolve(__dirname, '../dist'),
assetsSubDirectory: 'static',
assetsPublicPath: '/',
/**
* Source Maps
*/
productionSourceMap: false,
// https://webpack.js.org/configuration/devtool/#production
devtool: '#source-map',
// Gzip off by default as many popular static hosts such as
// Surge or Netlify already gzip all static assets for you.
// Before setting to `true`, make sure to:
// npm install --save-dev compression-webpack-plugin
productionGzip: false,
productionGzipExtensions: ['js', 'css'],
// Run the build command with an extra argument to
// View the bundle analyzer report after build finishes:
// `npm run build --report`
// Set to `true` or `false` to always turn it on or off
bundleAnalyzerReport: process.env.npm_config_report
}
}
using vue-router I setup the path
/src/router/index.js
routes: [
{
path: './',
name: 'Main',
component: Main
}
]
when I checked the subfolder it seems to loads the assets but the app container is empty
I'm not sure if this is something that I should fix on vue or webpack
javascript webpack vuejs2 vue-router html-webpack-plugin
What does the /config/index.js contains? Your webpack config? Can you show it? What commands are you running to build/serve your app? From where do you run it? Do you have errors in the console?
– Multicolaure
14 hours ago
Hey.. thanks for your comment !!...I just updated the question... and yes that file has the config for build and dev .. the commands arenpm run dev
andnpm run build
...I dont get any type or errors..
– marco gomes
14 hours ago
what did you move exactly and where? can you show your project structure now? And clearly show what changed.
– Multicolaure
13 hours ago
I just create a folder inside dist calltest
and move all the content /dist/test/** then I create a local server using phpphp -S localhost:8888
pointing to dist folder... so dist folder its my root when I go to localhost:8888/test/ it shows empty php ... the assets are loading but the components are not render.. <App> it's just empty what I need is taking thedist
folder and move it to a subfolder.. it could be one subfolder or nested folders like /test/ or /test/test1/test2/test3/
– marco gomes
13 hours ago
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I built the project and moved it to a subfolder
the only changes
/config/index.js
'use strict'
// Template version: 1.3.1
// see http://vuejs-templates.github.io/webpack for documentation.
const path = require('path')
module.exports = {
dev: {
// Paths
assetsSubDirectory: 'static',
assetsPublicPath: '/',
proxyTable: {},
// Various Dev Server settings
host: 'localhost', // can be overwritten by process.env.HOST
port: 8080, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined
autoOpenBrowser: false,
errorOverlay: true,
notifyOnErrors: true,
poll: false, // https://webpack.js.org/configuration/dev-server/#devserver-watchoptions-
// Use Eslint Loader?
// If true, your code will be linted during bundling and
// linting errors and warnings will be shown in the console.
useEslint: false,
// If true, eslint errors and warnings will also be shown in the error overlay
// in the browser.
showEslintErrorsInOverlay: false,
/**
* Source Maps
*/
// https://webpack.js.org/configuration/devtool/#development
devtool: 'cheap-module-eval-source-map',
// If you have problems debugging vue-files in devtools,
// set this to false - it *may* help
// https://vue-loader.vuejs.org/en/options.html#cachebusting
cacheBusting: true,
cssSourceMap: true
},
build: {
// Template for index.html
index: path.resolve(__dirname, '../dist/index.html'),
// Paths
assetsRoot: path.resolve(__dirname, '../dist'),
assetsSubDirectory: 'static',
assetsPublicPath: '/',
/**
* Source Maps
*/
productionSourceMap: false,
// https://webpack.js.org/configuration/devtool/#production
devtool: '#source-map',
// Gzip off by default as many popular static hosts such as
// Surge or Netlify already gzip all static assets for you.
// Before setting to `true`, make sure to:
// npm install --save-dev compression-webpack-plugin
productionGzip: false,
productionGzipExtensions: ['js', 'css'],
// Run the build command with an extra argument to
// View the bundle analyzer report after build finishes:
// `npm run build --report`
// Set to `true` or `false` to always turn it on or off
bundleAnalyzerReport: process.env.npm_config_report
}
}
using vue-router I setup the path
/src/router/index.js
routes: [
{
path: './',
name: 'Main',
component: Main
}
]
when I checked the subfolder it seems to loads the assets but the app container is empty
I'm not sure if this is something that I should fix on vue or webpack
javascript webpack vuejs2 vue-router html-webpack-plugin
I built the project and moved it to a subfolder
the only changes
/config/index.js
'use strict'
// Template version: 1.3.1
// see http://vuejs-templates.github.io/webpack for documentation.
const path = require('path')
module.exports = {
dev: {
// Paths
assetsSubDirectory: 'static',
assetsPublicPath: '/',
proxyTable: {},
// Various Dev Server settings
host: 'localhost', // can be overwritten by process.env.HOST
port: 8080, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined
autoOpenBrowser: false,
errorOverlay: true,
notifyOnErrors: true,
poll: false, // https://webpack.js.org/configuration/dev-server/#devserver-watchoptions-
// Use Eslint Loader?
// If true, your code will be linted during bundling and
// linting errors and warnings will be shown in the console.
useEslint: false,
// If true, eslint errors and warnings will also be shown in the error overlay
// in the browser.
showEslintErrorsInOverlay: false,
/**
* Source Maps
*/
// https://webpack.js.org/configuration/devtool/#development
devtool: 'cheap-module-eval-source-map',
// If you have problems debugging vue-files in devtools,
// set this to false - it *may* help
// https://vue-loader.vuejs.org/en/options.html#cachebusting
cacheBusting: true,
cssSourceMap: true
},
build: {
// Template for index.html
index: path.resolve(__dirname, '../dist/index.html'),
// Paths
assetsRoot: path.resolve(__dirname, '../dist'),
assetsSubDirectory: 'static',
assetsPublicPath: '/',
/**
* Source Maps
*/
productionSourceMap: false,
// https://webpack.js.org/configuration/devtool/#production
devtool: '#source-map',
// Gzip off by default as many popular static hosts such as
// Surge or Netlify already gzip all static assets for you.
// Before setting to `true`, make sure to:
// npm install --save-dev compression-webpack-plugin
productionGzip: false,
productionGzipExtensions: ['js', 'css'],
// Run the build command with an extra argument to
// View the bundle analyzer report after build finishes:
// `npm run build --report`
// Set to `true` or `false` to always turn it on or off
bundleAnalyzerReport: process.env.npm_config_report
}
}
using vue-router I setup the path
/src/router/index.js
routes: [
{
path: './',
name: 'Main',
component: Main
}
]
when I checked the subfolder it seems to loads the assets but the app container is empty
I'm not sure if this is something that I should fix on vue or webpack
javascript webpack vuejs2 vue-router html-webpack-plugin
javascript webpack vuejs2 vue-router html-webpack-plugin
edited 14 hours ago
asked yesterday
marco gomes
1,11611329
1,11611329
What does the /config/index.js contains? Your webpack config? Can you show it? What commands are you running to build/serve your app? From where do you run it? Do you have errors in the console?
– Multicolaure
14 hours ago
Hey.. thanks for your comment !!...I just updated the question... and yes that file has the config for build and dev .. the commands arenpm run dev
andnpm run build
...I dont get any type or errors..
– marco gomes
14 hours ago
what did you move exactly and where? can you show your project structure now? And clearly show what changed.
– Multicolaure
13 hours ago
I just create a folder inside dist calltest
and move all the content /dist/test/** then I create a local server using phpphp -S localhost:8888
pointing to dist folder... so dist folder its my root when I go to localhost:8888/test/ it shows empty php ... the assets are loading but the components are not render.. <App> it's just empty what I need is taking thedist
folder and move it to a subfolder.. it could be one subfolder or nested folders like /test/ or /test/test1/test2/test3/
– marco gomes
13 hours ago
add a comment |
What does the /config/index.js contains? Your webpack config? Can you show it? What commands are you running to build/serve your app? From where do you run it? Do you have errors in the console?
– Multicolaure
14 hours ago
Hey.. thanks for your comment !!...I just updated the question... and yes that file has the config for build and dev .. the commands arenpm run dev
andnpm run build
...I dont get any type or errors..
– marco gomes
14 hours ago
what did you move exactly and where? can you show your project structure now? And clearly show what changed.
– Multicolaure
13 hours ago
I just create a folder inside dist calltest
and move all the content /dist/test/** then I create a local server using phpphp -S localhost:8888
pointing to dist folder... so dist folder its my root when I go to localhost:8888/test/ it shows empty php ... the assets are loading but the components are not render.. <App> it's just empty what I need is taking thedist
folder and move it to a subfolder.. it could be one subfolder or nested folders like /test/ or /test/test1/test2/test3/
– marco gomes
13 hours ago
What does the /config/index.js contains? Your webpack config? Can you show it? What commands are you running to build/serve your app? From where do you run it? Do you have errors in the console?
– Multicolaure
14 hours ago
What does the /config/index.js contains? Your webpack config? Can you show it? What commands are you running to build/serve your app? From where do you run it? Do you have errors in the console?
– Multicolaure
14 hours ago
Hey.. thanks for your comment !!...I just updated the question... and yes that file has the config for build and dev .. the commands are
npm run dev
and npm run build
...I dont get any type or errors..– marco gomes
14 hours ago
Hey.. thanks for your comment !!...I just updated the question... and yes that file has the config for build and dev .. the commands are
npm run dev
and npm run build
...I dont get any type or errors..– marco gomes
14 hours ago
what did you move exactly and where? can you show your project structure now? And clearly show what changed.
– Multicolaure
13 hours ago
what did you move exactly and where? can you show your project structure now? And clearly show what changed.
– Multicolaure
13 hours ago
I just create a folder inside dist call
test
and move all the content /dist/test/** then I create a local server using php php -S localhost:8888
pointing to dist folder... so dist folder its my root when I go to localhost:8888/test/ it shows empty php ... the assets are loading but the components are not render.. <App> it's just empty what I need is taking the dist
folder and move it to a subfolder.. it could be one subfolder or nested folders like /test/ or /test/test1/test2/test3/– marco gomes
13 hours ago
I just create a folder inside dist call
test
and move all the content /dist/test/** then I create a local server using php php -S localhost:8888
pointing to dist folder... so dist folder its my root when I go to localhost:8888/test/ it shows empty php ... the assets are loading but the components are not render.. <App> it's just empty what I need is taking the dist
folder and move it to a subfolder.. it could be one subfolder or nested folders like /test/ or /test/test1/test2/test3/– marco gomes
13 hours ago
add a comment |
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53372536%2fwhy-the-app-container-is-empty-when-a-move-my-project-in-a-subfolder-using-vue-j%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
What does the /config/index.js contains? Your webpack config? Can you show it? What commands are you running to build/serve your app? From where do you run it? Do you have errors in the console?
– Multicolaure
14 hours ago
Hey.. thanks for your comment !!...I just updated the question... and yes that file has the config for build and dev .. the commands are
npm run dev
andnpm run build
...I dont get any type or errors..– marco gomes
14 hours ago
what did you move exactly and where? can you show your project structure now? And clearly show what changed.
– Multicolaure
13 hours ago
I just create a folder inside dist call
test
and move all the content /dist/test/** then I create a local server using phpphp -S localhost:8888
pointing to dist folder... so dist folder its my root when I go to localhost:8888/test/ it shows empty php ... the assets are loading but the components are not render.. <App> it's just empty what I need is taking thedist
folder and move it to a subfolder.. it could be one subfolder or nested folders like /test/ or /test/test1/test2/test3/– marco gomes
13 hours ago