https://github.com/sgmap/mes-aides-ui
Revision d7cb83fd82cc26f5dd64b04ffe24b9f4cff97cf6 authored by Thomas Guillet on 11 March 2021, 10:42:49 UTC, committed by Thomas Guillet on 11 March 2021, 16:10:30 UTC
1 parent 2548faf
Raw File
Tip revision: d7cb83fd82cc26f5dd64b04ffe24b9f4cff97cf6 authored by Thomas Guillet on 11 March 2021, 10:42:49 UTC
Stabilise la section des questions
Tip revision: d7cb83f
vue.config.js
const configureAPI = require('./configure')
const mock = require('./mock')
const webpack = require('webpack')
const before = process.env.NODE_ENV === 'front_only' ? mock : configureAPI
var { forEach } = require('./app/js/constants/benefits/back')

let count = 0
forEach(() => {
  count = count + 1
})
process.env.VUE_APP_BENEFIT_COUNT = count

module.exports = {
  configureWebpack: (config) => {
    config.devtool = 'source-map'
    config.plugins.push(
      new webpack.ContextReplacementPlugin(/moment[\\/]locale$/, /^\.\/(fr)$/)
    )
  },
  chainWebpack(config) {
    config.module
      .rule('vue')
      .use('vue-loader')
      .loader('vue-loader')
      .tap(options => ({
        ...options,
        compilerOptions: {
          ...options.compilerOptions,
          preserveWhitespace: true,
        },
      }));
  },
  devServer: {
    before: before
  }
}
back to top