Skip to content

Commit

Permalink
Merge pull request #175 from vios-fish/dependabot/npm_and_yarn/front/…
Browse files Browse the repository at this point in the history
…develop/copy-webpack-plugin-6.4.1

Dependabot/npm and yarn/front/develop/copy webpack plugin 6.4.1
  • Loading branch information
vios-fish authored Feb 2, 2021
2 parents 6257a90 + 03d31e8 commit 8ddc232
Show file tree
Hide file tree
Showing 5 changed files with 421 additions and 197 deletions.
2 changes: 1 addition & 1 deletion front/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
"@material-ui/icons": "^4.11.2",
"babel-eslint": "^10.0.1",
"babel-preset-stage-1": "^6.24.1",
"copy-webpack-plugin": "^4.6.0",
"copy-webpack-plugin": "^6.4.1",
"eslint": "^4.19.1",
"eslint-config-prettier": "^3.3.0",
"eslint-import-resolver-webpack": "^0.13.0",
Expand Down
14 changes: 7 additions & 7 deletions front/webpack.common.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const path = require('path')
const JSX_PATH = __dirname + '/app';
const path = require('path');
const JSX_PATH = path.resolve(__dirname, '/app');

module.exports = {
entry: {
Expand All @@ -16,17 +16,17 @@ module.exports = {
test: /\.jsx?$/,
exclude: /node_modules/,
loader: 'babel-loader',
query: {
options: {
presets: ['react', 'stage-1']
}
},
}
]
},
resolve: {
modules: ['node_modules'],
extensions: ['.js', '.jsx'],
alias: {
"automan": JSX_PATH,
},
automan: JSX_PATH
}
}
}
};
72 changes: 37 additions & 35 deletions front/webpack.dev.js
Original file line number Diff line number Diff line change
@@ -1,37 +1,39 @@
const webpack = require('webpack')
const merge = require('webpack-merge')
const common = require('./webpack.common.js')
const path = require('path')
const BundleTracker = require('webpack-bundle-tracker')
const CopyWebpackPlugin = require('copy-webpack-plugin')
const webpack = require('webpack');
const merge = require('webpack-merge');
const common = require('./webpack.common.js');
const path = require('path');
const BundleTracker = require('webpack-bundle-tracker');
const CopyWebpackPlugin = require('copy-webpack-plugin');

module.exports = merge(common, {
devtool: 'inline-source-map',
plugins: [
new webpack.HotModuleReplacementPlugin(),
new BundleTracker({filename: 'webpack-stats.json'}),
new webpack.ProvidePlugin({
$: 'jquery',
jQuery: 'jquery',
'window.jQuery': 'jquery'
}),
new CopyWebpackPlugin([
{
from: path.resolve(__dirname, 'static/img/'),
to: path.resolve(__dirname, 'dist/img/')
},
{
from: path.resolve(__dirname, 'static/css/'),
to: path.resolve(__dirname, 'dist/css/')
},
{
from: path.resolve(__dirname, 'static/js/'),
to: path.resolve(__dirname, 'dist/js/')
},
{
from: path.resolve(__dirname, 'static/fonts/'),
to: path.resolve(__dirname, 'dist/fonts/')
},
])
]
})
devtool: 'inline-source-map',
plugins: [
new webpack.HotModuleReplacementPlugin(),
new BundleTracker({ filename: 'webpack-stats.json' }),
new webpack.ProvidePlugin({
$: 'jquery',
jQuery: 'jquery',
'window.jQuery': 'jquery'
}),
new CopyWebpackPlugin({
patterns: [
{
from: path.resolve(__dirname, 'static/img/'),
to: path.resolve(__dirname, 'dist/img/')
},
{
from: path.resolve(__dirname, 'static/css/'),
to: path.resolve(__dirname, 'dist/css/')
},
{
from: path.resolve(__dirname, 'static/js/'),
to: path.resolve(__dirname, 'dist/js/')
},
{
from: path.resolve(__dirname, 'static/fonts/'),
to: path.resolve(__dirname, 'dist/fonts/')
}
]
})
]
});
74 changes: 38 additions & 36 deletions front/webpack.prod.js
Original file line number Diff line number Diff line change
@@ -1,38 +1,40 @@
const webpack = require('webpack')
const merge = require('webpack-merge')
const common = require('./webpack.common.js')
const path = require('path')
const BundleTracker = require('webpack-bundle-tracker')
const UglifyEsPlugin = require('uglify-es-webpack-plugin')
const CopyWebpackPlugin = require('copy-webpack-plugin')
const webpack = require('webpack');
const merge = require('webpack-merge');
const common = require('./webpack.common.js');
const path = require('path');
const BundleTracker = require('webpack-bundle-tracker');
const UglifyEsPlugin = require('uglify-es-webpack-plugin');
const CopyWebpackPlugin = require('copy-webpack-plugin');

module.exports = merge(common, {
plugins: [
new webpack.HotModuleReplacementPlugin(),
new BundleTracker({filename: 'webpack-stats.json'}),
new UglifyEsPlugin(),
new webpack.ProvidePlugin({
$: 'jquery',
jQuery: 'jquery',
'window.jQuery': 'jquery'
}),
new CopyWebpackPlugin([
{
from: path.resolve(__dirname, 'static/img/'),
to: path.resolve(__dirname, 'dist/img/')
},
{
from: path.resolve(__dirname, 'static/css/'),
to: path.resolve(__dirname, 'dist/css/')
},
{
from: path.resolve(__dirname, 'static/js/'),
to: path.resolve(__dirname, 'dist/js/')
},
{
from: path.resolve(__dirname, 'static/fonts/'),
to: path.resolve(__dirname, 'dist/fonts/')
},
])
],
})
plugins: [
new webpack.HotModuleReplacementPlugin(),
new BundleTracker({ filename: 'webpack-stats.json' }),
new UglifyEsPlugin(),
new webpack.ProvidePlugin({
$: 'jquery',
jQuery: 'jquery',
'window.jQuery': 'jquery'
}),
new CopyWebpackPlugin({
patterns: [
{
from: path.resolve(__dirname, 'static/img/'),
to: path.resolve(__dirname, 'dist/img/')
},
{
from: path.resolve(__dirname, 'static/css/'),
to: path.resolve(__dirname, 'dist/css/')
},
{
from: path.resolve(__dirname, 'static/js/'),
to: path.resolve(__dirname, 'dist/js/')
},
{
from: path.resolve(__dirname, 'static/fonts/'),
to: path.resolve(__dirname, 'dist/fonts/')
}
]
})
]
});
Loading

0 comments on commit 8ddc232

Please sign in to comment.