The Bubble web UI in VueJS
Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.
 
 
 
 

68 řádky
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. entry: './src/index.js',
  13. module: {
  14. rules: [
  15. {
  16. test: /\.vue?$/,
  17. exclude: /(node_modules)/,
  18. use: 'vue-loader',
  19. },
  20. {
  21. test: /\.js?$/,
  22. exclude: /(node_modules)/,
  23. use: 'babel-loader',
  24. },
  25. {
  26. test: /\.(css|less)$/,
  27. use: ['style-loader', 'css-loader'],
  28. },
  29. {
  30. test: /\.s[ac]ss$/i,
  31. use: ['css-loader', 'sass-loader'],
  32. },
  33. {
  34. test: /\.(png|jpe?g|gif)$/i,
  35. use: [
  36. {
  37. loader: 'file-loader',
  38. },
  39. ],
  40. },
  41. ],
  42. },
  43. plugins: [
  44. new HtmlWebpackPlugin({
  45. template: './src/index.html',
  46. }),
  47. new CopyWebpackPlugin([{ from: 'src/public', to: '' }]),
  48. ],
  49. devServer: {
  50. historyApiFallback: true,
  51. publicPath: '/',
  52. proxy: env && !!env.server && {
  53. '/api': env.server,
  54. } || null,
  55. },
  56. output: {
  57. publicPath: '/',
  58. },
  59. externals: {
  60. // global app config object
  61. config: JSON.stringify({
  62. production: true,
  63. apiUrl: '/api',
  64. }),
  65. },
  66. });