Skip to content

Instantly share code, notes, and snippets.

@MatthewJamesBoyle
Last active March 9, 2017 11:22
Show Gist options
  • Save MatthewJamesBoyle/2cebb7d1cdc76dc1692125d08fd9a31d to your computer and use it in GitHub Desktop.
Save MatthewJamesBoyle/2cebb7d1cdc76dc1692125d08fd9a31d to your computer and use it in GitHub Desktop.
webpack config
fontawesome-webfont.svg?912ec66d7572ff821749319396470bde 444 kB [emitted] [big]
chunk {0} extract-text-webpack-plugin-output-filename 36.5 kB [entry]
[0] ./~/css-loader/lib/css-base.js 1.51 kB {0} [built]
[1] ./src/style/font-awesome/fonts/fontawesome-webfont.svg?v=4.7.0 102 bytes {0} [built]
[2] ./src/style/font-awesome/fonts/fontawesome-webfont.eot 305 bytes {0} [built] [failed] [1 error]
[3] ./src/style/font-awesome/fonts/fontawesome-webfont.eot?v=4.7.0 313 bytes {0} [built] [failed] [1 error]
[4] ./src/style/font-awesome/fonts/fontawesome-webfont.ttf?v=4.7.0 318 bytes {0} [built] [failed] [1 error]
[5] ./src/style/font-awesome/fonts/fontawesome-webfont.woff2?v=4.7.0 320 bytes {0} [built] [failed] [1 error]
[6] ./src/style/font-awesome/fonts/fontawesome-webfont.woff?v=4.7.0 319 bytes {0} [built] [failed] [1 error]
[7] ./~/css-loader!./src/style/font-awesome/css/font-awesome.min.css 33.3 kB {0} [built]
ERROR in ./src/style/font-awesome/fonts/fontawesome-webfont.eot?v=4.7.0
Module parse failed: C:\Users\212335499\Documents\Development\test projects\vue-base\src\style\font-awesome\fonts\fontawesome-webfont.eot?v=4.7.0 Unexpected character '�' (1:1)
You may need an appropriate loader to handle this file type.
(Source code omitted for this binary file)
@ ./~/css-loader!./src/style/font-awesome/css/font-awesome.min.css 6:243-294
C:.
├───assets
├───components
└───style
├───core-design
│ └───brand
│ ├───favicon
│ ├───img
│ ├───svg
│ └───type
└───font-awesome
├───css
├───fonts
├───less
└───scss
var path = require('path')
var webpack = require('webpack')
var ExtractTextPlugin = require('extract-text-webpack-plugin')
module.exports = {
entry: './src/main.js',
output: {
path: path.resolve(__dirname, './dist'),
publicPath: '/dist/',
filename: 'build.js'
},
plugins:[
new ExtractTextPlugin(
{filename: './style/core-design/[name].css',
allChunks:true,
}),],
module: {
rules: [
{
test: /\.css$/,
loader: ExtractTextPlugin.extract({fallback: 'style-loader', use: 'css-loader'})
},
{
test: /\.vue$/,
loader: 'vue-loader',
options: {
loaders: {
}
// other vue-loader options go here
}
},
{
test: /\.js$/,
loader: 'babel-loader',
exclude: /node_modules/
},
{
test: /\.(png|jpg|gif|svg|ico)$/,
loader: 'file-loader',
options: {
name: '[name].[ext]?[hash]'
}
},
{
test: /\.(woff|woff2|eot|ttf|svg|jpg|png|ico)(\?.+)$/,
loader: 'file-loader',
query: {
name: './static/[name].[ext]'
},
},
]
},
resolve: {
alias: {
'vue$': 'vue/dist/vue.esm.js'
}
},
devServer: {
historyApiFallback: true,
noInfo: true
},
performance: {
hints: false
},
devtool: '#eval-source-map'
}
if (process.env.NODE_ENV === 'production') {
module.exports.devtool = '#source-map'
// http://vue-loader.vuejs.org/en/workflow/production.html
module.exports.plugins = (module.exports.plugins || []).concat([
new webpack.DefinePlugin({
'process.env': {
NODE_ENV: '"production"'
}
}),
new webpack.optimize.UglifyJsPlugin({
sourceMap: true,
compress: {
warnings: false
}
}),
new webpack.LoaderOptionsPlugin({
minimize: true
})
])
}
{
"name": "vue-base",
"description": "A Vue.js project",
"version": "1.0.0",
"author": "",
"private": true,
"scripts": {
"dev": "cross-env NODE_ENV=development webpack-dev-server --open --hot",
"build": "cross-env NODE_ENV=production webpack --progress --hide-modules"
},
"dependencies": {
"babel-core": "^6.23.1",
"babel-loader": "^6.4.0",
"css-loader": "^0.25.0",
"extract-text-webpack-plugin": "^2.1.0",
"file-loader": "^0.9.0",
"style-loader": "^0.13.2",
"svg-loader": "0.0.2",
"url-loader": "^0.5.8",
"vue": "^2.2.1",
"vue-router": "^2.3.0"
},
"devDependencies": {
"cross-env": "^3.0.0",
"css-loader": "^0.25.0",
"file-loader": "^0.9.0",
"style-loader": "^0.13.2",
"vue-loader": "^11.1.4",
"vue-template-compiler": "^2.2.1",
"webpack": "^2.2.0",
"webpack-dev-server": "^2.2.0"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment