Skip to content

Commit 0079989

Browse files
committed
format
1 parent 34ad71a commit 0079989

File tree

3 files changed

+54
-75
lines changed

3 files changed

+54
-75
lines changed

webpack.config.js

Lines changed: 44 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -1,66 +1,48 @@
1-
import path from 'path';
1+
import path from "path";
22

33
export default {
4-
target: "node",
5-
mode: 'development',
6-
devtool: 'inline-source-map',
4+
target: "node",
5+
mode: "development",
6+
devtool: "inline-source-map",
77

8-
entry: {
9-
min:path.resolve('./lib/index.js')
10-
},
11-
output: {
12-
path: path.resolve('./'),
13-
filename:'[name].js',
14-
library: 'myanmarNotation',
15-
libraryTarget: 'window',
16-
assetModuleFilename: '[name][hash][ext][query]'
17-
// path: path.resolve('./static'),
18-
// publicPath: '/',
19-
// filename:'[name].js',
20-
// assetModuleFilename: '[name][hash][ext][query]'
21-
},
22-
resolve: {
23-
extensions: ['.js']
24-
},
25-
plugins: [],
26-
module: {
27-
rules: [
28-
{
29-
test: /\.js$/,
30-
exclude: /(node_modules|bower_components)/,
31-
use: [
32-
{
33-
loader: 'babel-loader',
34-
options: {
35-
presets: [
36-
// [
37-
// '@babel/preset-env',
38-
// {
39-
// 'modules': 'auto',//commonjs,amd,umd,systemjs,auto
40-
// 'useBuiltIns': 'usage',
41-
// 'targets': '> 0.25%, not dead',
42-
// 'corejs': 3
43-
// }
44-
// ]
45-
]
46-
}
47-
}
48-
]
49-
}
50-
]
51-
}
8+
entry: {
9+
min: path.resolve("./lib/index.js")
10+
},
11+
output: {
12+
path: path.resolve("./"),
13+
filename: "[name].js",
14+
library: "myanmarNotation",
15+
libraryTarget: "window",
16+
assetModuleFilename: "[name][hash][ext][query]"
17+
},
18+
resolve: {
19+
extensions: [".js"]
20+
},
21+
plugins: [],
22+
module: {
23+
rules: [
24+
{
25+
test: /\.js$/,
26+
exclude: /(node_modules|bower_components)/,
27+
use: [
28+
{
29+
loader: "babel-loader",
30+
options: {
31+
presets: [
32+
// [
33+
// '@babel/preset-env',
34+
// {
35+
// 'modules': 'auto',//commonjs,amd,umd,systemjs,auto
36+
// 'useBuiltIns': 'usage',
37+
// 'targets': '> 0.25%, not dead',
38+
// 'corejs': 3
39+
// }
40+
// ]
41+
]
42+
}
43+
}
44+
]
45+
}
46+
]
47+
}
5248
};
53-
54-
// "babel": {
55-
// "presets": [
56-
// [
57-
// "@babel/preset-env",
58-
// {
59-
// "targets": {
60-
// "node": "current"
61-
// }
62-
// }
63-
// ]
64-
// ],
65-
// "plugins": []
66-
// },

webpack.docs-build.js

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
11
// import path from 'path';
2-
import webpack from 'webpack';
3-
import { merge } from 'webpack-merge';
2+
import webpack from "webpack";
3+
import { merge } from "webpack-merge";
44

5-
import common from './webpack.docs.js';
5+
import common from "./webpack.docs.js";
66

77
// @ts-ignore
88
const config = merge(common, {
9-
mode: 'production',
10-
devtool:'hidden-nosources-source-map', //source-map nosources-source-map
11-
output: {
12-
publicPath: '/myanmar-notation/'
13-
},
9+
mode: "production",
10+
devtool: "hidden-nosources-source-map", //source-map nosources-source-map
11+
output: {
12+
publicPath: "/myanmar-notation/"
13+
}
1414
});
1515

1616
// @ts-ignore
1717
const app = webpack(config);
1818
// app.compile(function(e){
1919
// console.log(e);
2020
// })
21-
app.run(function(e){
22-
console.log('...',e||'done');
21+
app.run(function(e) {
22+
console.log("...", e || "done");
2323
});

webpack.docs.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import path from "path";
2-
// import VueLoaderPlugin from 'vue-loader/lib/plugin.js';
32
import { VueLoaderPlugin } from "vue-loader";
43
import MiniCssExtractPlugin from "mini-css-extract-plugin";
54

@@ -53,10 +52,8 @@ export default {
5352
"vue-router": "VueRouter"
5453
},
5554

56-
target: "web",
5755
optimization: {
5856
// minimize: false
59-
minimize: false
6057
},
6158
plugins: [
6259
new VueLoaderPlugin(),

0 commit comments

Comments
 (0)