Update webpack dependencies

This commit is contained in:
Pierre Burgy 2017-08-18 17:51:10 +02:00
parent ddcfd8fb1f
commit adb5bf01ef
26 changed files with 93 additions and 65 deletions

View File

@ -29,9 +29,9 @@ class LeftMenuLink extends React.Component { // eslint-disable-line react/prefer
}
LeftMenuLink.propTypes = {
destination: React.PropTypes.string.isRequired.isRequired,
icon: React.PropTypes.string.isRequired.isRequired,
label: React.PropTypes.string.isRequired.isRequired,
destination: React.PropTypes.string.isRequired,
icon: React.PropTypes.string.isRequired,
label: React.PropTypes.string.isRequired,
};
export default LeftMenuLink;

View File

@ -88,7 +88,7 @@ class LeftMenuLinkContainer extends React.Component { // eslint-disable-line rea
}
LeftMenuLinkContainer.propTypes = {
plugins: React.PropTypes.object.isRequired.isRequired,
plugins: React.PropTypes.object.isRequired,
};
export default LeftMenuLinkContainer;

View File

@ -54,8 +54,8 @@ class Notification extends React.Component { // eslint-disable-line react/prefer
}
Notification.propTypes = {
notification: React.PropTypes.object.isRequired.isRequired,
onHideNotification: React.PropTypes.func.isRequired.isRequired,
notification: React.PropTypes.object.isRequired,
onHideNotification: React.PropTypes.func.isRequired,
};
export default Notification;

View File

@ -38,8 +38,8 @@ class NotificationsContainer extends React.Component { // eslint-disable-line re
}
NotificationsContainer.propTypes = {
notifications: React.PropTypes.object.isRequired.isRequired,
onHideNotification: React.PropTypes.func.isRequired.isRequired,
notifications: React.PropTypes.object.isRequired,
onHideNotification: React.PropTypes.func.isRequired,
};
export default NotificationsContainer;

View File

@ -23,8 +23,8 @@ class Plugin extends React.Component { // eslint-disable-line react/prefer-state
}
Plugin.propTypes = {
description: React.PropTypes.object.isRequired.isRequired,
title: React.PropTypes.object.isRequired.isRequired,
description: React.PropTypes.object.isRequired,
title: React.PropTypes.object.isRequired,
};
export default Plugin;

View File

@ -31,9 +31,9 @@ class PluginHeader extends React.Component { // eslint-disable-line react/prefer
}
PluginHeader.propTypes = {
actions: React.PropTypes.array.isRequired.isRequired,
description: React.PropTypes.object.isRequired.isRequired,
title: React.PropTypes.object.isRequired.isRequired,
actions: React.PropTypes.array.isRequired,
description: React.PropTypes.object.isRequired,
title: React.PropTypes.object.isRequired,
};
export default PluginHeader;

View File

@ -33,7 +33,7 @@ class PluginHeaderActions extends React.Component { // eslint-disable-line react
}
PluginHeaderActions.propTypes = {
actions: React.PropTypes.array.isRequired.isRequired,
actions: React.PropTypes.array.isRequired,
};
export default PluginHeaderActions;

View File

@ -25,8 +25,8 @@ class PluginHeaderTitle extends React.Component { // eslint-disable-line react/p
}
PluginHeaderTitle.propTypes = {
description: React.PropTypes.object.isRequired.isRequired,
title: React.PropTypes.object.isRequired.isRequired,
description: React.PropTypes.object.isRequired,
title: React.PropTypes.object.isRequired,
};
export default PluginHeaderTitle;

View File

@ -28,9 +28,9 @@ function Toggle(props) { // eslint-disable-line react/prefer-stateless-function
}
Toggle.propTypes = {
messages: React.PropTypes.object.isRequired.isRequired,
onToggle: React.PropTypes.func.isRequired.isRequired,
values: React.PropTypes.array.isRequired.isRequired,
messages: React.PropTypes.object.isRequired,
onToggle: React.PropTypes.func.isRequired,
values: React.PropTypes.array.isRequired,
};
export default Toggle;

View File

@ -19,7 +19,7 @@ ToggleOption.propTypes = {
React.PropTypes.object.isRequired,
React.PropTypes.string.isRequired,
]).isRequired,
value: React.PropTypes.string.isRequired.isRequired,
value: React.PropTypes.string.isRequired,
};
export default injectIntl(ToggleOption);

View File

@ -37,13 +37,13 @@ export class App extends React.Component { // eslint-disable-line react/prefer-s
}
App.contextTypes = {
router: React.PropTypes.object.isRequired.isRequired.isRequired,
router: React.PropTypes.object.isRequired,
};
App.propTypes = {
children: React.PropTypes.node.isRequired.isRequired,
notifications: React.PropTypes.object.isRequired.isRequired,
onHideNotification: React.PropTypes.func.isRequired.isRequired,
children: React.PropTypes.node.isRequired,
notifications: React.PropTypes.object.isRequired,
onHideNotification: React.PropTypes.func.isRequired,
};
const mapStateToProps = createStructuredSelector({

View File

@ -23,7 +23,7 @@ export class Content extends React.Component { // eslint-disable-line react/pref
}
Content.propTypes = {
children: React.PropTypes.node.isRequired.isRequired,
children: React.PropTypes.node.isRequired,
};
const mapStateToProps = createSelector(

View File

@ -35,7 +35,7 @@ export class HomePage extends React.Component { // eslint-disable-line react/pre
}
HomePage.propTypes = {
plugins: React.PropTypes.object.isRequired.isRequired,
plugins: React.PropTypes.object.isRequired,
};
const mapStateToProps = createStructuredSelector({

View File

@ -23,9 +23,9 @@ export class LanguageProvider extends React.Component { // eslint-disable-line r
}
LanguageProvider.propTypes = {
children: React.PropTypes.element.isRequired.isRequired.isRequired,
locale: React.PropTypes.string.isRequired.isRequired,
messages: React.PropTypes.object.isRequired.isRequired,
children: React.PropTypes.element.isRequired,
locale: React.PropTypes.string.isRequired,
messages: React.PropTypes.object.isRequired,
};

View File

@ -26,7 +26,7 @@ export class LeftMenu extends React.Component { // eslint-disable-line react/pre
}
LeftMenu.propTypes = {
plugins: React.PropTypes.object.isRequired.isRequired,
plugins: React.PropTypes.object.isRequired,
};
function mapDispatchToProps(dispatch) {

View File

@ -29,7 +29,7 @@ export class LocaleToggle extends React.Component { // eslint-disable-line
}
LocaleToggle.propTypes = {
onLocaleToggle: React.PropTypes.func.isRequired.isRequired,
onLocaleToggle: React.PropTypes.func.isRequired,
};
const mapStateToProps = createSelector(

View File

@ -20,7 +20,7 @@ export class NotificationProvider extends React.Component { // eslint-disable-li
}
NotificationProvider.propTypes = {
children: React.PropTypes.object.isRequired.isRequired,
children: React.PropTypes.object.isRequired,
};
const mapStateToProps = selectNotificationProvider();

View File

@ -37,11 +37,11 @@ export class PluginPage extends React.Component { // eslint-disable-line react/p
}
PluginPage.contextTypes = {
router: React.PropTypes.object.isRequired.isRequired.isRequired,
router: React.PropTypes.object.isRequired,
};
PluginPage.propTypes = {
plugins: React.PropTypes.object.isRequired.isRequired,
plugins: React.PropTypes.object.isRequired,
};
const mapStateToProps = createSelector(

View File

@ -44,7 +44,7 @@
"prettier": "^1.5.3",
"rimraf": "^2.5.4",
"strapi-helper-plugin": "3.0.0-alpha.4.8",
"webpack": "^2.1.0-beta.25"
"webpack": "^3.5.5"
},
"author": {
"name": "Strapi",

View File

@ -16,7 +16,7 @@ module.exports = (options) => ({
loaders: [{
test: /\.js$/, // Transform all .js files required somewhere with Babel
use: {
loader: 'babel',
loader: 'babel-loader',
options: {
presets: options.babelPresets,
env: {
@ -65,7 +65,24 @@ module.exports = (options) => ({
test: /\.(jpg|png|gif)$/,
loaders: [
'file-loader',
'image-webpack?{progressive:true, optimizationLevel: 7, interlaced: false, pngquant:{quality: "65-90", speed: 4}}',
{
loader: 'image-webpack-loader',
query: {
mozjpeg: {
progressive: true,
},
gifsicle: {
interlaced: false,
},
optipng: {
optimizationLevel: 4,
},
pngquant: {
quality: '65-90',
speed: 4,
},
},
},
],
}, {
test: /\.html$/,
@ -81,7 +98,7 @@ module.exports = (options) => ({
plugins: options.plugins.concat([
new webpack.ProvidePlugin({
// make fetch available
fetch: 'exports?self.fetch!whatwg-fetch',
fetch: 'exports-loader?self.fetch!whatwg-fetch',
}),
// Always expose NODE_ENV to webpack, in order to use `process.env.NODE_ENV`

View File

@ -13,7 +13,6 @@ const postcssFocus = require('postcss-focus');
const postcssReporter = require('postcss-reporter');
const plugins = [
new webpack.HotModuleReplacementPlugin(), // Tell webpack we want hot reloading
new webpack.NoErrorsPlugin(),
];
const isAdmin = process.env.IS_ADMIN === 'true';
@ -70,7 +69,9 @@ module.exports = require('./webpack.base.babel')({
}, {
loader: 'postcss-loader',
options: {
config: path.resolve(__dirname, '..', 'postcss', 'postcss.config.js'),
config: {
path: path.resolve(__dirname, '..', 'postcss', 'postcss.config.js')
},
},
}, {
loader: 'sass-loader',
@ -117,7 +118,9 @@ module.exports = require('./webpack.base.babel')({
*/
function dependencyHandlers() {
// Don't do anything during the DLL Build step
if (process.env.BUILDING_DLL) { return []; }
if (process.env.BUILDING_DLL) {
return [];
}
// If the package.json does not have a dllPlugin property, use the CommonsChunkPlugin
if (!dllPlugin) {

View File

@ -73,7 +73,7 @@ module.exports = require('./webpack.base.babel')({
}, {
loader: 'css-loader',
options: {
localIdentName: `${pluginId}[local]__[path][name]__[hash:base64:5]`,
localIdentName: `${isAdmin ? 'admin' : pluginId}[local]__[path][name]__[hash:base64:5]`,
modules: true,
importLoaders: 1,
sourceMap: true,
@ -81,7 +81,9 @@ module.exports = require('./webpack.base.babel')({
}, {
loader: 'postcss-loader',
options: {
config: path.resolve(__dirname, '..', 'postcss', 'postcss.config.js'),
config: {
path: path.resolve(__dirname, '..', 'postcss', 'postcss.config.js')
},
},
}, {
loader: 'sass-loader',

View File

@ -29,7 +29,7 @@ module.exports = {
],
preLoaders: [
{ test: /\.js$/,
loader: 'isparta',
loader: 'isparta-loader',
include: path.resolve('src/'),
},
],
@ -45,7 +45,7 @@ module.exports = {
loader: 'imports?define=>false,require=>false',
},
{ test: /\.js$/,
loader: 'babel',
loader: 'babel-loader',
exclude: [/node_modules/],
},
{ test: /\.jpe?g$|\.gif$|\.png$|\.svg$/i,

View File

@ -13,6 +13,9 @@ const addDevMiddlewares = (app, webpackConfig) => {
publicPath: webpackConfig.output.publicPath,
silent: true,
stats: 'errors-only',
headers: {
'Access-Control-Allow-Origin': '*'
}
});
app.use(middleware);

View File

@ -55,7 +55,7 @@
"compression": "1.6.2",
"coveralls": "2.11.14",
"cross-env": "3.1.3",
"css-loader": "0.25.0",
"css-loader": "^0.28.5",
"enzyme": "2.5.1",
"eslint": "^4.4.1",
"eslint-config-airbnb": "^15.1.0",
@ -70,29 +70,29 @@
"eventsource-polyfill": "0.9.6",
"expect": "1.20.2",
"expect-jsx": "2.6.0",
"exports-loader": "0.6.3",
"exports-loader": "^0.6.4",
"express": "4.14.0",
"extract-text-webpack-plugin": "^2.1.2",
"file-loader": "0.9.0",
"extract-text-webpack-plugin": "^3.0.0",
"file-loader": "^0.11.2",
"fontfaceobserver": "2.0.1",
"history": "3.0.0",
"html-loader": "^0.4.3",
"html-webpack-plugin": "^2.22.0",
"image-webpack-loader": "2.0.0",
"html-loader": "^0.5.1",
"html-webpack-plugin": "^2.30.1",
"image-webpack-loader": "^3.3.1",
"immutable": "3.8.1",
"imports-loader": "0.6.5",
"imports-loader": "^0.7.1",
"intl": "1.2.4",
"invariant": "2.2.1",
"json-loader": "0.5.4",
"json-loader": "^0.5.7",
"lint-staged": "3.2.0",
"lodash": "4.15.0",
"mocha": "3.1.2",
"node-sass": "4.5.3",
"null-loader": "0.1.1",
"null-loader": "^0.1.1",
"plop": "1.5.0",
"postcss-cssnext": "2.11.0",
"postcss-focus": "1.0.0",
"postcss-loader": "1.3.3",
"postcss-loader": "^2.0.6",
"postcss-reporter": "2.0.0",
"postcss-smart-import": "0.6.13",
"pre-commit": "1.1.3",
@ -112,15 +112,18 @@
"redux-saga": "0.11.0",
"reselect": "2.5.3",
"rimraf": "2.5.4",
"sass-loader": "4.1.1",
"sass-loader": "^6.0.6",
"shelljs": "0.7.5",
"sinon": "2.0.0-pre",
"style-loader": "0.13.1",
"url-loader": "0.5.7",
"style-loader": "^0.18.2",
"url-loader": "^0.5.9",
"warning": "3.0.0",
"webpack": "2.1.0-beta.25",
"webpack-dev-middleware": "1.8.4",
"webpack-hot-middleware": "2.13.1",
"webpack": "^3.5.5",
"webpack-dev-middleware": "^1.12.0",
"webpack-hot-middleware": "^2.18.2",
"whatwg-fetch": "1.0.0"
},
"devDependencies": {
"uglifyjs-webpack-plugin": "^1.0.0-beta.2"
}
}
}

View File

@ -48,7 +48,7 @@
"prettier": "^1.5.3",
"rimraf": "^2.5.4",
"strapi-helper-plugin": "file:../strapi-helper-plugin",
"webpack": "^2.1.0-beta.25"
"webpack": "^3.5.5"
},
"author": {
"name": "Strapi team",
@ -67,4 +67,4 @@
"npm": ">= 3.0.0"
},
"license": "MIT"
}
}