javascript usando webpack velho
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了javascript usando webpack velho相关的知识,希望对你有一定的参考价值。
{
"name": "frontend",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"dev": "webpack-dev-server --progress --colors --inline --hot",
"production": "webpack --progress -p"
},
"keywords": [],
"author": "",
"license": "ISC",
"devDependencies": {
"axios": "^0.15.3",
"babel-core": "^6.22.1",
"babel-loader": "^6.2.10",
"babel-plugin-react-html-attrs": "^2.0.0",
"babel-plugin-transform-object-rest-spread": "^6.22.0",
"babel-preset-es2015": "^6.22.0",
"babel-preset-react": "^6.22.0",
"bootstrap": "^3.3.7",
"css-loader": "^0.26.1",
"extract-text-webpack-plugin": "^1.0.1",
"file-loader": "^0.9.0",
"font-awesome": "^4.7.0",
"react": "^15.4.2",
"react-dom": "^15.4.2",
"react-redux": "^5.0.2",
"react-router": "^3.0.2",
"redux": "^3.6.0",
"redux-multi": "^0.1.12",
"redux-promise": "^0.5.3",
"redux-thunk": "^2.2.0",
"style-loader": "^0.13.1",
"webpack": "^1.14.0",
"webpack-dev-server": "^1.16.2"
}
}
const webpack = require('webpack')
const ExtractTextPlugin = require('extract-text-webpack-plugin')
module.exports = {
entry: './src/index.jsx',
output: {
path: __dirname + '/public',
filename: './app.js'
},
devServer: {
port: 8080,
contentBase: './public',
},
resolve: {
extensions: ['', '.js', '.jsx'],
alias: {
modules: __dirname + '/node_modules'
}
},
plugins: [
new ExtractTextPlugin('app.css')
],
module: {
loaders: [{
test: /.js[x]?$/,
loader: 'babel-loader',
exclude: /node_modules/,
query: {
presets: ['es2015', 'react'],
plugins: ['transform-object-rest-spread']
}
}, {
test: /\.css$/,
loader: ExtractTextPlugin.extract('style-loader', 'css-loader')
}, {
test: /\.woff|.woff2|.ttf|.eot|.svg*.*$/,
loader: 'file'
}]
}
}
以上是关于javascript usando webpack velho的主要内容,如果未能解决你的问题,请参考以下文章
javascript Usando导出没有javascript para organizar o codigo graphql
javascript Usando内存缓存com apolo客户端反应
markdown Usando Zoom no manjaro.md
python 示例处理程序usando o modulo subprocess
python 示例处理程序usando o modulo subprocess
text Importando schema usando dependencia graphql-import