const webpackMerge = require('webpack-merge');
const common = require('./webpack.common.js');

process.env.BABEL_ENV = 'development';

module.exports = webpackMerge.merge(common, {
  mode: 'development',
  devtool: 'inline-source-map',
  resolve: {
    modules: ['packages', 'node_modules'],
    extensions: ['.js', '.ts', '.tsx'],
    // alias: {
    //   "styled-components": path.resolve(__dirname, "node_modules", "styled-components"),
    // }
  },
  devServer: {
    open: true,
    hot: false,
    static: {
      watch: true,
    },
    devMiddleware: {
      publicPath: '/themes/system/dest/',
    },
    port: 3000,
    proxy: [
      {
        context: ['**'],
        target: 'http://acms.org:80',
        secure: false,
        changeOrigin: true,
      },
    ],
  }
});
