Vue project build configuration to build dist directory

Copyright: please indicate the source, thank you! https://blog.csdn.net/dreamstone_xiaoqw/article/details/90228757

In recent Enneagram test program using a front-end module vue reconstruction framework.

Xiao Bian to be a prophet:

  • Application of the front end from the original native application sub-page JS reconstituted to increase readability based vue frame codes;
  • vue-cli way to build the project, can be more easily packaged file
  • You can also use components, more engineering project management

How to do it? Proceed as follows:

Modify the file: config / index.js

build: {

	index: path.resolve(__dirname, '../dist/index.html'),
	assetsRoot: path.resolve(__dirname, '../../../../public/'),
	assetsSubDirectory: 'static/9style',
	assetsPublicPath: '/',
}

Generate static HTML file link file:

href=/static/9style/css/app.xxxx.css 
href=/static/9style/js/app.xxxx.css 

assetsRoot specified directory from vue project config / index.js file to start looking.

Guess you like

Origin blog.csdn.net/dreamstone_xiaoqw/article/details/90228757