build.js 760 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. import webpack from 'webpack'
  2. export default {
  3. // Enable server-side rendering (https://go.nuxtjs.dev/ssr-mode)
  4. ssr: true,
  5. // Auto import components (https://go.nuxtjs.dev/config-components)
  6. components: true,
  7. loading: '~/components/Layout/Loading.vue',
  8. // Build Configuration (https://go.nuxtjs.dev/config-build)
  9. build: {
  10. extend (config, { isDev, isClient }) {
  11. config.node = {
  12. fs: "empty"
  13. }
  14. },
  15. plugins: [
  16. new webpack.ProvidePlugin({
  17. _: 'lodash'
  18. })
  19. ]
  20. },
  21. // Port and local host
  22. server: {
  23. port: 3002,
  24. host: '0.0.0.0', // default: localhost,
  25. },
  26. // Poll for hot reloading with docker
  27. watchers: {
  28. webpack: {
  29. aggregateTimeout: 300,
  30. poll: 1000
  31. }
  32. }
  33. }