File tree Expand file tree Collapse file tree 3 files changed +17
-7
lines changed Expand file tree Collapse file tree 3 files changed +17
-7
lines changed Original file line number Diff line number Diff line change 33< head >
44 < meta charset ="UTF-8 ">
55 < title > < %= appname %> </ title >
6+ < link rel ="stylesheet " href ="dist/bundle.css ">
67</ head >
78< body >
89 < app > </ app >
Original file line number Diff line number Diff line change 2323 "eslint-plugin-import" : " ^1.6.0" ,
2424 "eslint-plugin-jsx-a11y" : " ^1.0.3" ,
2525 "eslint-plugin-react" : " ^5.0.1" ,
26+ "extract-text-webpack-plugin" : " ^1.0.1" ,
2627 "file-loader" : " ^0.8.5" ,
2728 "html-webpack-plugin" : " ^2.16.0" ,
2829 "less" : " ^2.6.1" ,
Original file line number Diff line number Diff line change 11var webpack = require ( 'webpack' ) ;
2+ var ExtractTextPlugin = require ( "extract-text-webpack-plugin" ) ;
23
34module . exports = {
45 entry : './src/main.js' ,
@@ -44,11 +45,20 @@ module.exports = {
4445 }
4546 }
4647 ]
47- }
48+ } ,
49+ vue : {
50+ loaders : {
51+ css : ExtractTextPlugin . extract ( 'css' ) ,
52+ less : ExtractTextPlugin . extract ( 'css!less' )
53+ }
54+ } ,
55+ plugins : [
56+ new ExtractTextPlugin ( "bundle.css" )
57+ ]
4858} ;
4959
5060if ( process . env . NODE_ENV === 'production' ) {
51- module . exports . plugins = [
61+ module . exports . plugins = module . exports . plugins . concat ( [
5262 new webpack . DefinePlugin ( {
5363 'process.env' : {
5464 NODE_ENV : '"production"'
@@ -60,12 +70,10 @@ if (process.env.NODE_ENV === 'production') {
6070 }
6171 } ) ,
6272 new webpack . optimize . OccurenceOrderPlugin ( )
63- ] ;
73+ ] ) ;
6474
65- module . exports . vue = {
66- autoprefixer : {
67- browsers : [ 'last 2 versions' ]
68- }
75+ module . exports . vue . autoprefixer = {
76+ browsers : [ 'last 2 versions' ]
6977 }
7078} else {
7179 module . exports . devtool = '#source-map' ;
You can’t perform that action at this time.
0 commit comments