[add-lint-and-ci] - added lint, ci and boilerplate for plugin building

This commit is contained in:
Guilherme Leme
2024-06-19 12:34:32 -03:00
parent 9496076bab
commit a2b1373008
15 changed files with 470 additions and 1 deletions

43
webpack.config.js Normal file
View File

@@ -0,0 +1,43 @@
module.exports = {
entry: './src/index.tsx',
output: {
filename: '<PluginName>.js',
library: '<PluginName>',
libraryTarget: 'umd',
publicPath: '/static/',
globalObject: 'this',
},
devServer: {
allowedHosts: 'all',
port: 4701,
host: 'localhost',
hot: false,
liveReload: false,
client: {
overlay: false,
},
},
module: {
rules: [
{
test: /\.(js|jsx)$/,
exclude: /node_modules/,
use: {
loader: 'babel-loader',
},
},
{
test: /\.css$/,
use: ['style-loader', 'css-loader'],
},
{
test: /\.tsx?$/,
use: 'ts-loader',
exclude: /node_modules/,
},
],
},
resolve: {
extensions: ['.js', '.jsx', '.tsx', '.ts'],
},
};