|
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051 |
- /**
- * Copyright (c) 2020 Bubble, Inc. All rights reserved.
- * For personal (non-commercial) use, see license: https://getbubblenow.com/bubble-license/
- */
- const HtmlWebpackPlugin = require('html-webpack-plugin');
- const CopyWebpackPlugin = require('copy-webpack-plugin');
-
- module.exports = {
- mode: 'development',
- resolve: {
- extensions: ['.js', '.vue']
- },
- module: {
- rules: [
- {
- test: /\.vue?$/,
- exclude: /(node_modules)/,
- use: 'vue-loader'
- },
- {
- test: /\.js?$/,
- exclude: /(node_modules)/,
- use: 'babel-loader'
- },
- {
- test: /\.(css|less)$/,
- use: [{
- loader: "css-loader" // translates CSS into CommonJS
- }]
- }
- ]
- },
- plugins: [
- new HtmlWebpackPlugin({
- template: './src/index.html'
- }),
- new CopyWebpackPlugin([
- { from: 'src/public', to: '' }
- ])
- ],
- devServer: {
- historyApiFallback: true
- },
- externals: {
- // global app config object
- config: JSON.stringify({
- production: true,
- apiUrl: '/api'
- })
- }
- };
|