Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const webpack = require('webpack');
- const writeFilePlugin = require('write-file-webpack-plugin');
- const webpackMerge = require('webpack-merge');
- const BrowserSyncPlugin = require('browser-sync-webpack-plugin');
- const WebpackNotifierPlugin = require('webpack-notifier');
- const path = require('path');
- const utils = require('./utils.js');
- const commonConfig = require('./webpack.common.js');
- const ENV = 'development';
- module.exports = webpackMerge(commonConfig({
- env: ENV
- }), {
- devtool: 'eval-source-map',
- devServer: {
- contentBase: './build/www',
- proxy: [{
- context: [
- /* jhipster-needle-add-entity-to-webpack - JHipster will add entity api paths here */
- '/services',
- '/static/images',
- '/management',
- '/swagger-resources',
- '/v2/api-docs',
- '/h2-console'
- ],
- target: 'http://localhost:8080',
- secure: false
- }]
- },
- entry: {
- polyfills: './src/main/webapp/app/polyfills',
- global: './src/main/webapp/content/css/global.css',
- main: './src/main/webapp/app/app.main'
- },
- output: {
- path: utils.root('build/www'),
- filename: 'app/[name].bundle.js',
- chunkFilename: 'app/[id].chunk.js'
- },
- module: {
- rules: [{
- test: /\.ts$/,
- enforce: 'pre',
- loaders: 'tslint-loader',
- exclude: ['node_modules', new RegExp('reflect-metadata\\' + path.sep + 'Reflect\\.ts')]
- },
- {
- test: /\.ts$/,
- loaders: [
- 'angular2-template-loader',
- 'awesome-typescript-loader'
- ],
- exclude: ['node_modules/generator-jhipster']
- },
- {
- test: /\.css$/,
- loaders: ['to-string-loader', 'css-loader'],
- exclude: /(vendor\.css|global\.css)/
- },
- {
- test: /(vendor\.css|global\.css)/,
- loaders: ['style-loader', 'css-loader']
- }
- ]
- },
- plugins: [
- new BrowserSyncPlugin({
- host: 'localhost',
- port: 8900,
- proxy: {
- target: 'http://localhost:9060'
- }
- }, {
- reload: false
- }),
- new webpack.NoEmitOnErrorsPlugin(),
- new webpack.NamedModulesPlugin(),
- new writeFilePlugin(),
- new webpack.WatchIgnorePlugin([
- utils.root('src/test'),
- ]),
- new WebpackNotifierPlugin({
- title: 'SVSWeb',
- contentImage: path.join(__dirname, 'ncr-logo.png')
- })
- ]
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement