refactor: webpack configuration (#398)
* refactor: webpack configuration * feat: webpack hot reloading Co-authored-by: Johnny Almonte <johnny243@users.noreply.github.com>
This commit is contained in:
@@ -2,20 +2,12 @@ const path = require('path');
|
||||
const webpack = require('webpack');
|
||||
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
|
||||
const CopyPlugin = require('copy-webpack-plugin');
|
||||
|
||||
module.exports = {
|
||||
entry: './app/assets/javascripts/index.ts',
|
||||
output: {
|
||||
filename: './javascripts/app.js'
|
||||
},
|
||||
devServer: {
|
||||
proxy: {
|
||||
'/extensions': {
|
||||
target: 'http://localhost:3001',
|
||||
pathRewrite: { '^/extensions': '/public/extensions' }
|
||||
}
|
||||
},
|
||||
port: 3001
|
||||
},
|
||||
plugins: [
|
||||
new webpack.DefinePlugin({
|
||||
__VERSION__: JSON.stringify(require('./package.json').version)
|
||||
@@ -27,10 +19,9 @@ module.exports = {
|
||||
new MiniCssExtractPlugin({
|
||||
// Options similar to the same options in webpackOptions.output
|
||||
filename: './stylesheets/app.css',
|
||||
ignoreOrder: false // Enable to remove warnings about conflicting order
|
||||
ignoreOrder: true // Enable to remove warnings about conflicting order
|
||||
})
|
||||
],
|
||||
devtool: 'source-map',
|
||||
resolve: {
|
||||
extensions: ['.ts', '.js'],
|
||||
alias: {
|
||||
|
||||
Reference in New Issue
Block a user