Last active
August 21, 2017 06:16
-
-
Save inyl/9c734ff418e0202d54ca158f7465b497 to your computer and use it in GitHub Desktop.
webpack2
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
{ | |
"name": "cnn_api", | |
"version": "1.0.0", | |
"description": "1. cd {project_folder} 2. ./start.sh 3. http://localhost:5000/input_test", | |
"main": "app.bundle.js", | |
"scripts": { | |
"test": "echo \"Error: no test specified\" && exit 1" | |
}, | |
"repository": { | |
"type": "git", | |
"url": "" | |
}, | |
"author": "", | |
"license": "ISC", | |
"dependencies": { | |
"axios": "^0.16.1", | |
"keen-ui": "^1.0.0", | |
"sweetalert": "^1.1.3", | |
"vue": "^2.1.10" | |
}, | |
"devDependencies": { | |
"babel-core": "^6.22.1", | |
"babel-loader": "^6.2.10", | |
"babel-polyfill": "^6.23.0", | |
"babel-preset-env": "^1.4.0", | |
"babel-preset-es2016": "^6.22.0", | |
"css-loader": "^0.26.1", | |
"style-loader": "^0.13.1", | |
"webpack": "^2.2.1", | |
"webpack-dev-server": "^2.4.5" | |
} | |
} |
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
var path = require('path'); | |
var webpack = require('webpack'); | |
/** | |
* Created by wonseok on 2017. 2. 10.. | |
*/ | |
module.exports = { | |
entry: { | |
'vendor': ['vue', 'axios', 'sweetalert', 'keen-ui'], | |
'app': path.resolve(__dirname, 'static/js/entry') | |
}, | |
output: { | |
path: path.resolve(__dirname, 'static/js/'), | |
publicPath: '/static/js/', | |
filename: '[name].bundle.js' | |
}, | |
devServer: { | |
contentBase: path.join(__dirname, './dist'), | |
compress : true, | |
proxy : { | |
"**": "http://localhost:5001" | |
}, | |
hot:true | |
}, | |
resolve: { | |
extensions: ['.js', '.css', '.vue'], | |
alias: { | |
'vue$': 'vue/dist/vue.common.js' | |
} | |
}, | |
plugins : [ | |
new webpack.optimize.CommonsChunkPlugin({ | |
name : "vendor", | |
minChunks : Infinity | |
}), | |
new webpack.HotModuleReplacementPlugin() | |
], | |
module: { | |
rules: [ | |
{ | |
test: /\.css$/, | |
loader: "style-loader!css-loader" | |
}, | |
{ | |
test: /\.js?$/, | |
exclude: /node_modules/, | |
loader: 'babel-loader', | |
query: { | |
presets: ['es2016'] | |
} | |
} | |
] | |
} | |
}; |
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
var path = require('path'); | |
var webpack = require('webpack'); | |
/** | |
* Created by wonseok on 2017. 2. 10.. | |
*/ | |
module.exports = { | |
entry: { | |
'vendor': ['vue', 'axios', 'sweetalert', 'keen-ui'], | |
'app': path.resolve(__dirname, 'static/js/entry') | |
}, | |
output: { | |
path: path.resolve(__dirname, 'static/js/'), | |
publicPath: '/static/js/', | |
filename: '[name].bundle.js' | |
}, | |
resolve: { | |
extensions: ['.js', '.css', '.vue'], | |
alias: { | |
'vue$': 'vue/dist/vue.min.js' | |
} | |
}, | |
plugins : [ | |
new webpack.optimize.UglifyJsPlugin({ | |
}), | |
new webpack.optimize.CommonsChunkPlugin({ | |
name : "vendor", | |
minChunks : Infinity | |
}) | |
], | |
module: { | |
rules: [ | |
{ | |
test: /\.css$/, | |
loader: "style-loader!css-loader" | |
}, | |
{ | |
test: /\.js?$/, | |
exclude: /node_modules/, | |
loader: 'babel-loader', | |
query: { | |
presets: [['env',{ | |
"targets": {"ie": 8}, | |
"debug": true | |
}]] | |
} | |
} | |
] | |
} | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment