The Bubble web UI in VueJS
Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

webpack.config.js 1.3 KiB

4 år sedan
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  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 = {
  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: [
  27. {
  28. loader: 'css-loader', // translates CSS into CommonJS
  29. },
  30. ],
  31. },
  32. {
  33. test: /\.s[ac]ss$/i,
  34. use: ['style-loader', 'css-loader', 'sass-loader'],
  35. },
  36. {
  37. test: /\.(png|jpe?g|gif)$/i,
  38. use: [
  39. {
  40. loader: 'file-loader',
  41. },
  42. ],
  43. },
  44. ],
  45. },
  46. plugins: [
  47. new HtmlWebpackPlugin({
  48. template: './src/index.html',
  49. }),
  50. new CopyWebpackPlugin([{ from: 'src/public', to: '' }]),
  51. ],
  52. devServer: {
  53. historyApiFallback: true,
  54. },
  55. externals: {
  56. // global app config object
  57. config: JSON.stringify({
  58. production: true,
  59. apiUrl: '/api',
  60. }),
  61. },
  62. };