Skip to content

Commit 34c4caf

Browse files
[feat] HRM 설정 prototype
1 parent e8613b9 commit 34c4caf

File tree

5 files changed

+43
-7240
lines changed

5 files changed

+43
-7240
lines changed

.yarn/install-state.gz

987 KB
Binary file not shown.

build/config.js

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -27,30 +27,30 @@ const builds = {
2727
dest: resolvePath('dist/apexcharts.common.js'),
2828
format: 'cjs',
2929
env: 'production',
30-
banner
30+
banner,
3131
},
3232
'web-esm': {
3333
entry: resolvePath('src/apexcharts.js'),
3434
dest: resolvePath('dist/apexcharts.esm.js'),
3535
format: 'es',
3636
env: 'production',
37-
banner
37+
banner,
3838
},
3939
'web-umd-dev': {
4040
entry: resolvePath('src/apexcharts.js'),
4141
dest: resolvePath('dist/apexcharts.js'),
4242
format: 'umd',
4343
env: 'development',
44-
banner
44+
banner,
4545
},
4646
'web-umd-prod': {
4747
entry: resolvePath('src/apexcharts.js'),
4848
dest: resolvePath('dist/apexcharts.min.js'),
4949
format: 'umd',
5050
env: 'production',
5151
banner,
52-
assets: true
53-
}
52+
assets: true,
53+
},
5454
}
5555

5656
/**
@@ -63,42 +63,42 @@ function rollupConfig(opts) {
6363
plugins: [
6464
resolve(),
6565
json({
66-
preferConst: true
66+
preferConst: true,
6767
}),
6868
postcss({
6969
inject: false,
70-
plugins: []
70+
plugins: [],
7171
}),
7272
svgo({
73-
raw: true
73+
raw: true,
7474
}),
7575
babel.babel({
7676
exclude: 'node_modules/**',
7777
plugins: ['@babel/plugin-proposal-class-properties'].concat(
7878
opts.istanbul ? ['istanbul'] : []
79-
)
79+
),
8080
}),
81-
replace({ 'process.env.NODE_ENV': JSON.stringify(opts.env) })
81+
replace({ 'process.env.NODE_ENV': JSON.stringify(opts.env) }),
8282
],
8383
output: {
8484
file: opts.dest,
8585
format: opts.format,
8686
banner: opts.banner,
87-
name: 'ApexCharts'
88-
}
87+
name: 'ApexCharts',
88+
},
8989
}
9090

9191
if (opts.env === 'production') {
9292
config.plugins.push(
9393
strip({
9494
debugger: true,
95-
functions: ['console.log', 'debug', 'alert'],
96-
sourceMap: false
95+
functions: ['debug', 'alert'],
96+
sourceMap: false,
9797
}),
9898
terser({
9999
output: {
100-
ascii_only: true
101-
}
100+
ascii_only: true,
101+
},
102102
})
103103
)
104104
}
@@ -109,16 +109,16 @@ function rollupConfig(opts) {
109109
[
110110
{
111111
files: 'src/assets/apexcharts.css',
112-
dest: 'dist'
112+
dest: 'dist',
113113
},
114114
{
115115
files: 'src/locales/*.*',
116-
dest: 'dist/locales'
117-
}
116+
dest: 'dist/locales',
117+
},
118118
],
119119
{
120120
verbose: true,
121-
watch: false
121+
watch: false,
122122
}
123123
)
124124
)
@@ -139,7 +139,7 @@ async function executeBuildEntry(options) {
139139
return {
140140
path: config.output.file,
141141
code: generated.output[0].code,
142-
isDev: /apexcharts\.js$/.test(config.output.file)
142+
isDev: /apexcharts\.js$/.test(config.output.file),
143143
}
144144
}
145145

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
"types/*.d.ts"
2121
],
2222
"scripts": {
23-
"dev": "rollup -w -c build/config.js --environment TARGET:web-umd-dev",
23+
"dev": "rollup -w -c build/config.js --environment TARGET:web-esm",
2424
"dev:cjs": "rollup -w -c build/config.js --environment TARGET:web-cjs",
2525
"bundle": "node build/build.js",
2626
"build": "npm run bundle && webpack",
@@ -110,4 +110,4 @@
110110
"visualizations",
111111
"data"
112112
]
113-
}
113+
}

webpack.config.js

Lines changed: 20 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -10,47 +10,52 @@ module.exports = {
1010
libraryTarget: 'umd',
1111
umdNamedDefine: false,
1212
path: path.resolve(__dirname, 'dist/'),
13-
filename: 'apexcharts.amd.js'
13+
filename: 'apexcharts.amd.js',
1414
},
15+
1516
module: {
1617
rules: [
1718
{
1819
test: /\.js$/,
1920
use: {
2021
loader: 'babel-loader',
2122
options: {
22-
presets: ['@babel/preset-env']
23-
}
24-
}
23+
presets: ['@babel/preset-env'],
24+
},
25+
},
2526
},
2627
{
2728
test: /\.css$/,
28-
use: ['style-loader', 'css-loader']
29+
use: ['style-loader', 'css-loader'],
2930
},
3031
{
3132
test: /\.svg$/,
32-
loader: 'svg-inline-loader'
33-
}
34-
]
33+
loader: 'svg-inline-loader',
34+
},
35+
],
3536
},
3637
watchOptions: {
37-
poll: true
38+
poll: true,
3839
},
3940
resolve: {
40-
modules: [__dirname, 'src', 'node_modules'],
41-
extensions: ['.js', '.json']
41+
modules: [
42+
path.resolve(__dirname, '../../node_modules'),
43+
path.resolve(__dirname, 'node_modules'),
44+
'node_modules',
45+
],
46+
extensions: ['.js', '.json'],
4247
},
4348
performance: {
4449
hints: false,
4550
maxEntrypointSize: 512000,
46-
maxAssetSize: 512000
51+
maxAssetSize: 512000,
4752
},
4853
plugins: [
4954
new ESLintPlugin(),
5055
new BundleAnalyzerPlugin({
5156
analyzerMode: 'static',
5257
reportFilename: path.join('..', 'bundle-analysis.html'),
53-
openAnalyzer: false
54-
})
55-
]
58+
openAnalyzer: false,
59+
}),
60+
],
5661
}

0 commit comments

Comments
 (0)