-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwebpack.common.js
34 lines (33 loc) · 1009 Bytes
/
webpack.common.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
const path = require('path')
const KintonePlugin = require('@kintone/webpack-plugin-kintone-plugin')
const { pluginZipFilePath } = require('./webpack-utils')
module.exports = {
entry: {
desktop: './src/js/desktop.js', // デスクトップ用
config: './src/js/config.js', // プラグイン設定画面用
}, // entry は エントリポイント、context はエントリポイントになるファイルが含まれるパス
output: {
path: path.resolve(__dirname, 'src', 'dist'), // src と同一階層に dist を作成してそちらを設定
filename: '[name].js',
},
module: {
rules: [
{
test: /\.js$/,
exclude: /node_modules/,
loader: 'babel-loader',
},
{
test: /\.css$/,
loader: ['style-loader', 'css-loader'],
},
],
},
plugins: [
new KintonePlugin({
manifestJSONPath: './src/manifest.json',
privateKeyPath: './private.ppk',
pluginZipPath: pluginZipFilePath,
}),
],
}