This repository has been archived by the owner on Oct 28, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: adjust web pack invocation on post install build script.
- Loading branch information
Evandro Carenho
committed
Mar 29, 2017
1 parent
36a6604
commit 53c0822
Showing
3 changed files
with
56 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,2 @@ | ||
# Maven | ||
target/ | ||
|
||
# Intellij | ||
.idea | ||
*.iml | ||
|
||
# NPM | ||
node_modules/ | ||
dist/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
/* eslint-disable */ | ||
var webpack = require('webpack'); | ||
var path = require("path"), | ||
CopyWebpackPlugin = require('copy-webpack-plugin'); | ||
|
||
module.exports = { | ||
entry: path.resolve(__dirname, "./index.jsx"), | ||
output: { | ||
path: path.resolve(__dirname, "./dist"), | ||
filename: "index.bundle.js" | ||
}, | ||
devtool: 'eval-source-map', | ||
module: { | ||
preLoaders: [ | ||
{ test: /\.jsx?$/, loader: 'eslint', exclude: /node_modules/ } | ||
], | ||
loaders: [ | ||
{ test: /\.css$/, loader: "style!css" }, | ||
{ test: /\.less$/, loader: "style!css!less" }, | ||
{ | ||
test: /\.jsx?$/, | ||
loader: 'babel', | ||
query: { | ||
presets: ['react', 'es2015'], | ||
plugins: ['transform-object-rest-spread'], | ||
} | ||
}, | ||
{ test: /\.(jpe?g|png|gif|svg)$/i, loader: 'url?limit=10000!img?progressive=true' }, | ||
{ test: /\.(woff|woff2)(\?v=\d+\.\d+\.\d+)?$/, loader: 'url?limit=10000&mimetype=application/font-woff' }, | ||
{ test: /\.ttf(\?v=\d+\.\d+\.\d+)?$/, loader: 'url?limit=10000&mimetype=application/octet-stream' }, | ||
{ test: /\.eot(\?v=\d+\.\d+\.\d+)?$/, loader: 'file' }, | ||
{ test: /\.svg(\?v=\d+\.\d+\.\d+)?$/, loader: 'url?limit=10000&mimetype=image/svg+xml' } | ||
] | ||
}, | ||
resolve: { | ||
extensions: ['', '.js', '.jsx'] | ||
}, | ||
eslint: { | ||
configFile: './.eslintrc', | ||
failOnWarning: false, | ||
failOnError: true, | ||
}, | ||
plugins: [ | ||
new webpack.DefinePlugin({ | ||
'process.env.NODE_ENV': JSON.stringify('production'), // Tells React to build in either dev or prod modes. https://facebook.github.io/react/downloads.html (See bottom) | ||
__DEV__: false | ||
}), | ||
new webpack.optimize.DedupePlugin(), | ||
new webpack.optimize.UglifyJsPlugin(), | ||
new webpack.optimize.AggressiveMergingPlugin() | ||
] | ||
}; |