The Bubble web UI in VueJS
Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.
 
 
 
 

67 rindas
1.4 KiB

  1. /**
  2. * Copyright (c) 2020 Bubble, Inc. All rights reserved.
  3. * For personal (non-commercial) use, see license: https://getbubblenow.com/bubble-license/
  4. */
  5. const HtmlWebpackPlugin = require('html-webpack-plugin');
  6. const CopyWebpackPlugin = require('copy-webpack-plugin');
  7. module.exports = (env) => ({
  8. mode: 'development',
  9. resolve: {
  10. extensions: ['.js', '.vue'],
  11. },
  12. module: {
  13. rules: [
  14. {
  15. test: /\.vue?$/,
  16. exclude: /(node_modules)/,
  17. use: 'vue-loader',
  18. },
  19. {
  20. test: /\.js?$/,
  21. exclude: /(node_modules)/,
  22. use: 'babel-loader',
  23. },
  24. {
  25. test: /\.(css|less)$/,
  26. use: ['style-loader', 'css-loader'],
  27. },
  28. {
  29. test: /\.s[ac]ss$/i,
  30. use: ['css-loader', 'sass-loader'],
  31. },
  32. {
  33. test: /\.(png|jpe?g|gif)$/i,
  34. use: [
  35. {
  36. loader: 'file-loader',
  37. },
  38. ],
  39. },
  40. ],
  41. },
  42. plugins: [
  43. new HtmlWebpackPlugin({
  44. template: './src/index.html',
  45. }),
  46. new CopyWebpackPlugin([{ from: 'src/public', to: '' }]),
  47. ],
  48. devServer: {
  49. historyApiFallback: true,
  50. publicPath: '/',
  51. proxy: env && !!env.server && {
  52. '/api': env.server,
  53. } || null,
  54. },
  55. output: {
  56. publicPath: '/',
  57. },
  58. externals: {
  59. // global app config object
  60. config: JSON.stringify({
  61. production: true,
  62. apiUrl: '/api',
  63. }),
  64. },
  65. });