Files
SCM-Manager/scm-plugins/scm-svn-plugin/webpack.config.js

70 lines
1.5 KiB
JavaScript
Raw Normal View History

2019-10-07 10:57:09 +02:00
const path = require("path");
module.exports = {
entry: {
2019-10-07 17:06:00 +02:00
"scm-svn-plugin": "./src/main/js/index.js"
2019-10-07 10:57:09 +02:00
},
2019-10-07 17:06:00 +02:00
devtool: "source-map",
2019-10-07 10:57:09 +02:00
target: "web",
node: {
fs: "empty",
net: "empty",
tls: "empty"
},
2019-10-07 17:06:00 +02:00
externals: [
"react",
"react-dom",
//"react-jss",
"react-i18next",
"@scm-manager/ui-types",
"@scm-manager/ui-extensions",
"@scm-manager/ui-components"
],
2019-10-07 10:57:09 +02:00
module: {
rules: [
{
parser: {
system: false,
systemjs: false
}
},
{
test: /\.(js|jsx)$/,
// exclude: /node_modules/,
use: {
loader: "babel-loader",
options: {
presets: [
"@babel/preset-env",
"@babel/preset-react",
"@babel/preset-flow"
],
plugins: ["@babel/plugin-proposal-class-properties"]
}
}
},
{
test: /\.(css|scss|sass)$/i,
use: [
// Creates `style` nodes from JS strings
"style-loader",
// Translates CSS into CommonJS
"css-loader",
// Compiles Sass to CSS
"sass-loader"
]
},
{
test: /\.(png|svg|jpg|gif|woff2?|eot|ttf)$/,
use: ["file-loader"]
}
]
},
output: {
2019-10-07 17:06:00 +02:00
path: path.join(__dirname, "target", "scm-svn-plugin-2.0.0-SNAPSHOT", "webapp", "plugins"),
filename: "[name].bundle.js",
library: "scm-svn-plugin",
libraryTarget: "amd"
2019-10-07 10:57:09 +02:00
}
};