-
Notifications
You must be signed in to change notification settings - Fork 94
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
amsik
committed
Feb 5, 2018
1 parent
e21c41a
commit 358a523
Showing
12 changed files
with
8,747 additions
and
4,511 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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"presets": ["stage-3"] | ||
} |
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,72 @@ | ||
'use strict' | ||
|
||
const path = require('path') | ||
const pkg = require('../package.json') | ||
const webpack = require('webpack') | ||
|
||
const CopyWebpackPlugin = require('copy-webpack-plugin') | ||
|
||
module.exports = { | ||
context: path.resolve(__dirname, '../'), | ||
|
||
entry: { | ||
app: './src/main.js' | ||
}, | ||
|
||
output: { | ||
path: path.resolve(__dirname, ".."), | ||
filename: pkg.module | ||
}, | ||
|
||
resolve: { | ||
extensions: ['.js', '.vue', '.json'], | ||
alias: { | ||
'vue$': 'vue/dist/vue.esm.js', | ||
'@': path.resolve('src'), | ||
} | ||
}, | ||
|
||
module: { | ||
rules: [ | ||
{ | ||
test: /\.vue$/, | ||
loader: 'vue-loader' | ||
}, | ||
{ | ||
test: /\.js$/, | ||
loader: 'babel-loader', | ||
include: [path.resolve('src')] | ||
} | ||
] | ||
}, | ||
|
||
devtool: 'eval-source-map', | ||
|
||
devServer: { | ||
contentBase: path.resolve(__dirname, "..", "demo"), | ||
compress: true, | ||
port: 9000, | ||
publicPath: '/', | ||
open: true, | ||
hot: true, | ||
watchOptions: { | ||
poll: false | ||
}, | ||
lazy: false | ||
}, | ||
|
||
plugins: [ | ||
new webpack.DefinePlugin({ | ||
'process.env': '"development"' | ||
}), | ||
new webpack.HotModuleReplacementPlugin(), | ||
new webpack.NamedModulesPlugin(), // HMR shows correct file names in console on update. | ||
new webpack.NoEmitOnErrorsPlugin(), | ||
new CopyWebpackPlugin([ | ||
{ | ||
from: path.resolve(__dirname, '../dist'), | ||
to: 'dist', | ||
ignore: ['.*'] | ||
}]) | ||
] | ||
} |
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,56 @@ | ||
'use strict' | ||
|
||
const path = require('path') | ||
const pkg = require('../package.json') | ||
const webpack = require('webpack') | ||
const UglifyJsPlugin = require('uglifyjs-webpack-plugin') | ||
|
||
module.exports = { | ||
context: path.resolve(__dirname, '../'), | ||
|
||
entry: { | ||
app: './src/main.js' | ||
}, | ||
|
||
output: { | ||
path: path.resolve(__dirname, ".."), | ||
filename: pkg.module | ||
}, | ||
|
||
resolve: { | ||
extensions: ['.js', '.vue', '.json'], | ||
alias: { | ||
'vue$': 'vue/dist/vue.esm.js', | ||
'@': path.resolve('src'), | ||
} | ||
}, | ||
|
||
module: { | ||
rules: [ | ||
{ | ||
test: /\.vue$/, | ||
loader: 'vue-loader' | ||
}, | ||
{ | ||
test: /\.js$/, | ||
loader: 'babel-loader', | ||
include: [path.resolve('src')] | ||
} | ||
] | ||
}, | ||
|
||
plugins: [ | ||
new webpack.DefinePlugin({ | ||
'process.env': '"production"' | ||
}), | ||
new UglifyJsPlugin({ | ||
uglifyOptions: { | ||
compress: { | ||
warnings: false | ||
} | ||
}, | ||
sourceMap: false , | ||
parallel: true | ||
}) | ||
] | ||
} |
File renamed without changes.
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 was deleted.
Oops, something went wrong.
Oops, something went wrong.