-
Notifications
You must be signed in to change notification settings - Fork 0
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
1 parent
8c86252
commit 4bbd2f7
Showing
10 changed files
with
6,530 additions
and
2 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,7 @@ | ||
{ | ||
"presets": ["@babel/preset-env"], | ||
"plugins": [ | ||
"@babel/plugin-proposal-class-properties", | ||
"@babel/plugin-transform-runtime" | ||
] | ||
} |
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,20 @@ | ||
# ---> macOS | ||
.DS_Store | ||
.AppleDouble | ||
.LSOverride | ||
|
||
# Files that might appear in the root of a volume | ||
.DocumentRevisions-V100 | ||
.fseventsd | ||
.Spotlight-V100 | ||
.TemporaryItems | ||
.Trashes | ||
.VolumeIcon.icns | ||
|
||
# Directories potentially created on remote AFP share | ||
.AppleDB | ||
.AppleDesktop | ||
Network Trash Folder | ||
Temporary Items | ||
.apdisk | ||
node_modules |
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 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,32 @@ | ||
const path = require('path'); | ||
const { CleanWebpackPlugin } = require('clean-webpack-plugin'); | ||
// const HtmlWebpackPlugin = require('html-webpack-plugin'); | ||
|
||
module.exports = { | ||
entry: './src/index.js', | ||
plugins: [ | ||
new CleanWebpackPlugin(), | ||
// new HtmlWebpackPlugin({ | ||
// title: 'Production' | ||
// }) | ||
], | ||
output: { | ||
filename: 'adate.module.js', | ||
path: path.resolve('./dist'), | ||
chunkFilename: 'adate.module.js', | ||
library: 'AMap', | ||
// libraryExport: 'default', | ||
libraryTarget: 'umd', | ||
// umdNamedDefine: true, | ||
globalObject: 'this' // 当为一个libray库的时候必须设置为 this 才可以在各种模式下使用 | ||
}, | ||
module: { | ||
rules: [ | ||
{ | ||
test: /\.js$/, | ||
loader: 'babel-loader', | ||
exclude: '/node_modules/' | ||
}, | ||
] | ||
} | ||
}; |
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,8 @@ | ||
const merge = require('webpack-merge'); | ||
const common = require('./webpack.common.js'); | ||
module.exports = merge(common, { | ||
devtool: 'inline-source-map', | ||
devServer: { | ||
contentBase: './dist' | ||
} | ||
}); |
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,16 @@ | ||
const merge = require('webpack-merge'); | ||
const UglifyJSPlugin = require('uglifyjs-webpack-plugin'); | ||
const common = require('./webpack.common.js'); | ||
const webpack = require('webpack'); | ||
|
||
module.exports = merge(common, { | ||
plugins: [ | ||
new UglifyJSPlugin({ | ||
sourceMap: true | ||
}), | ||
new webpack.DefinePlugin({ | ||
// process.env.NODE_ENV | ||
'process.env.NODE_ENV': JSON.stringify('production') | ||
}) | ||
] | ||
}); |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.