Permalink
Browse files

feat: check duplicated packages in webpack

aurelia/binding#702 this is a safe check to warn user about duplicated aurelia-binding v1 and v2 (and potentially other duplicates).
  • Loading branch information...
huochunpeng committed Jul 26, 2018
1 parent 2bb862e commit bd69e5ed3febc6670543c60be356638f93524e91
@@ -51,6 +51,7 @@ module.exports = function(project, options) {
'copy-webpack-plugin',
'mini-css-extract-plugin',
'aurelia-webpack-plugin',
'duplicate-package-checker-webpack-plugin',
'webpack',
'webpack-cli',
'webpack-dev-server',
@@ -41,6 +41,7 @@
"css-loader": "^0.28.11",
"debounce": "^1.1.0",
"del": "^3.0.0",
"duplicate-package-checker-webpack-plugin": "^3.0.0",
"event-stream": "^3.3.4",
"expose-loader": "^0.7.5",
"mini-css-extract-plugin": "^0.4.1",
@@ -2,6 +2,7 @@ const path = require('path');
const HtmlWebpackPlugin = require('html-webpack-plugin');
const CopyWebpackPlugin = require('copy-webpack-plugin');
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
const DuplicatePackageCheckerPlugin = require('duplicate-package-checker-webpack-plugin');
const project = require('./aurelia_project/aurelia.json');
const { AureliaPlugin, ModuleDependenciesPlugin } = require('aurelia-webpack-plugin');
const { ProvidePlugin } = require('webpack');
@@ -79,15 +80,15 @@ module.exports = ({production, server, extractCss, coverage, analyze} = {}) => (
use: cssRules
},
// @if cssProcessor.id='less'
{
test: /\.less$/i,
{
test: /\.less$/i,
use: ['style-loader', 'css-loader', 'less-loader'],
issuer: /\.[tj]s$/i
},
{
test: /\.less$/i,
{
test: /\.less$/i,
use: ['css-loader', 'less-loader'],
issuer: /\.html?$/i
issuer: /\.html?$/i
},
// @endif
// @if cssProcessor.id='stylus'
@@ -99,7 +100,7 @@ module.exports = ({production, server, extractCss, coverage, analyze} = {}) => (
{
test: /\.styl$/i,
use: ['css-loader', 'stylus-loader'],
issuer: /\.html?$/i
issuer: /\.html?$/i
},
// @endif
// @if cssProcessor.id='sass'
@@ -141,6 +142,7 @@ module.exports = ({production, server, extractCss, coverage, analyze} = {}) => (
]
},
plugins: [
new DuplicatePackageCheckerPlugin(),
new AureliaPlugin(),
new ProvidePlugin({
'Promise': 'bluebird'

0 comments on commit bd69e5e

Please sign in to comment.