vue.config.js 906 B

1234567891011121314151617181920212223242526272829
  1. const path = require('path')
  2. const name = 'Vue Typescript Admin'
  3. module.exports = {
  4. // TODO: Remember to change publicPath to fit your need
  5. publicPath: process.env.NODE_ENV === 'production' ? '/vue-typescript-admin-template/' : '/',
  6. lintOnSave: process.env.NODE_ENV === 'development',
  7. pwa: {
  8. name: name
  9. },
  10. pluginOptions: {
  11. 'style-resources-loader': {
  12. preProcessor: 'scss',
  13. patterns: [
  14. path.resolve(__dirname, 'src/styles/_variables.scss'),
  15. path.resolve(__dirname, 'src/styles/_mixins.scss')
  16. ]
  17. }
  18. },
  19. chainWebpack(config) {
  20. // provide the app's title in html-webpack-plugin's options list so that
  21. // it can be accessed in index.html to inject the correct title.
  22. // https://cli.vuejs.org/guide/webpack.html#modifying-options-of-a-plugin
  23. config.plugin('html').tap(args => {
  24. args[0].title = name
  25. return args
  26. })
  27. }
  28. }