我在我的angular 4
项目中使用webpack
。它指向同一URL的api
。现在,对于生产环境,我有一个不同的API URL,那么我应该在哪里精确地放置新的URL?我正在使用jhipster
项目。
来源:https://jhipster.github.io/using-angular/
webpack.prod.js:
const commonConfig = require('./webpack.common.js');
const webpackMerge = require('webpack-merge');
const CopyWebpackPlugin = require('copy-webpack-plugin');
const ExtractTextPlugin = require("extract-text-webpack-plugin");
const Visualizer = require('webpack-visualizer-plugin');
const path = require('path');
const ENV = 'prod';
module.exports = webpackMerge(commonConfig({ env: ENV }), {
devtool: 'source-map',
output: {
path: path.resolve('./build/www'),
filename: '[hash].[name].bundle.js',
chunkFilename: '[hash].[id].chunk.js'
},
plugins: [
new ExtractTextPlugin('[hash].styles.css'),
new Visualizer({
// Webpack statistics in target folder
filename: '../stats.html'
})
]
});
output: { publicPath: '/' },
- peinearydevelopment