Mise à jour de webpack 1 vers la v2
parent
29e7e1efdb
commit
9612bc2366
22
package.json
22
package.json
|
@ -11,7 +11,7 @@
|
|||
"node": ">=6.2.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"babel-runtime": "^6.6.1",
|
||||
"babel-runtime": "^6.23.0",
|
||||
"classnames": "^2.2.1",
|
||||
"deep-assign": "^2.0.0",
|
||||
"install": "^0.8.2",
|
||||
|
@ -34,15 +34,17 @@
|
|||
},
|
||||
"devDependencies": {
|
||||
"autoprefixer": "^6.3.3",
|
||||
"babel-core": "^6.7.4",
|
||||
"babel": "^6.23.0",
|
||||
"babel-core": "^6.24.0",
|
||||
"babel-eslint": "^7.1.1",
|
||||
"babel-loader": "^6.2.4",
|
||||
"babel-plugin-syntax-do-expressions": "^6.13.0",
|
||||
"babel-loader": "^6.4.0",
|
||||
"babel-plugin-transform-class-properties": "^6.23.0",
|
||||
"babel-plugin-transform-decorators-legacy": "^1.3.4",
|
||||
"babel-polyfill": "^6.9.1",
|
||||
"babel-preset-es2015": "^6.6.0",
|
||||
"babel-preset-react": "^6.5.0",
|
||||
"babel-preset-stage-0": "^6.5.0",
|
||||
"babel-plugin-transform-do-expressions": "^6.22.0",
|
||||
"babel-plugin-transform-object-rest-spread": "^6.23.0",
|
||||
"babel-polyfill": "^6.23.0",
|
||||
"babel-preset-env": "^1.2.1",
|
||||
"babel-preset-react": "^6.23.0",
|
||||
"core-js": "^2.2.0",
|
||||
"css-loader": "^0.27.3",
|
||||
"eslint": "^3.13.1",
|
||||
|
@ -60,8 +62,8 @@
|
|||
"redux-devtools-log-monitor": "^1.0.9",
|
||||
"style-loader": "^0.13.0",
|
||||
"url-loader": "^0.5.7",
|
||||
"webpack": "^1.12.14",
|
||||
"webpack-dev-server": "^1.14.1",
|
||||
"webpack": "^2.2.1",
|
||||
"webpack-dev-server": "^2.4.2",
|
||||
"yaml-loader": "^0.4.0"
|
||||
},
|
||||
"scripts": {
|
||||
|
|
|
@ -1,11 +1,16 @@
|
|||
{
|
||||
"presets": [
|
||||
"es2015",
|
||||
"react",
|
||||
"stage-0"
|
||||
["env", {
|
||||
"targets": {
|
||||
"browsers": ["last 2 versions", "safari >= 7"]
|
||||
}
|
||||
}],
|
||||
"react"
|
||||
],
|
||||
"plugins": [
|
||||
"transform-decorators-legacy",
|
||||
"syntax-do-expressions"
|
||||
"transform-do-expressions",
|
||||
"transform-object-rest-spread",
|
||||
"transform-class-properties"
|
||||
]
|
||||
}
|
||||
|
|
|
@ -0,0 +1,9 @@
|
|||
module.exports = {
|
||||
plugins: [
|
||||
require('autoprefixer')
|
||||
]
|
||||
}
|
||||
|
||||
/*
|
||||
browsers: [ '> 1% in FR', 'not ie < 10' ]
|
||||
*/
|
|
@ -23,6 +23,6 @@ new WebpackDevServer(webpack(config), {
|
|||
}
|
||||
}).listen(3000, 'localhost', function (err) {
|
||||
if (err)
|
||||
console.log(err)
|
||||
console.log('Bonjour ! Je vous sers sur localhost:3000')
|
||||
console.log(err) //eslint-disable-line no-console
|
||||
console.log('Bonjour ! Je vous sers sur localhost:3000') //eslint-disable-line no-console
|
||||
})
|
||||
|
|
|
@ -18,14 +18,31 @@ module.exports = {
|
|||
module: {
|
||||
loaders: [ {
|
||||
test: /\.css$/,
|
||||
loader: 'style!css!postcss-loader'
|
||||
use: [
|
||||
{
|
||||
loader: 'style-loader',
|
||||
},
|
||||
{
|
||||
loader: 'css-loader',
|
||||
options: {
|
||||
sourceMap: true,
|
||||
importLoaders: 1,
|
||||
}
|
||||
},
|
||||
{
|
||||
loader: 'postcss-loader',
|
||||
options: {
|
||||
sourceMap: 'inline',
|
||||
}
|
||||
}
|
||||
]
|
||||
}, {
|
||||
test: /\.html$/,
|
||||
loader: 'html'
|
||||
loader: 'html-loader'
|
||||
},
|
||||
{
|
||||
test: /\.yaml$/,
|
||||
loader: 'json!yaml'
|
||||
loader: 'json-loader!yaml-loader'
|
||||
},
|
||||
{
|
||||
test: /\.js$/,
|
||||
|
@ -34,20 +51,15 @@ module.exports = {
|
|||
},
|
||||
{
|
||||
test: /\.(jpe?g|png|gif|svg)$/i,
|
||||
loader: 'url?limit=10000!img?progressive=true'
|
||||
loader: 'url-loader?limit=10000!img-loader?progressive=true'
|
||||
}, {
|
||||
test: /\.ne$/,
|
||||
loader: 'nearley'
|
||||
loader: 'nearley-loader'
|
||||
}]
|
||||
},
|
||||
postcss: [
|
||||
autoprefixer({
|
||||
browsers: [ '> 1% in FR', 'not ie < 10' ]
|
||||
})
|
||||
],
|
||||
plugins: [
|
||||
new webpack.HotModuleReplacementPlugin(),
|
||||
new webpack.NoErrorsPlugin(),
|
||||
new webpack.NoEmitOnErrorsPlugin(),
|
||||
// in order to use the fetch polyfill:
|
||||
new webpack.ProvidePlugin({
|
||||
'fetch': 'imports?this=>global!exports?global.fetch!whatwg-fetch'
|
||||
|
|
Loading…
Reference in New Issue