jellyfin-web/webpack.common.js

33 lines
827 B
JavaScript
Raw Normal View History

2019-09-30 16:58:05 -07:00
const path = require("path");
const { CleanWebpackPlugin} = require("clean-webpack-plugin");
2019-09-30 16:58:05 -07:00
const CopyPlugin = require("copy-webpack-plugin");
2019-11-06 17:02:32 -07:00
const Assets = [
"alameda/alameda.js",
"requirejs/require.js"
];
module.exports = {
2019-09-30 16:58:05 -07:00
context: path.resolve(__dirname, "src"),
entry: "./bundle.js",
resolve: {
modules: [
2019-09-30 16:58:05 -07:00
path.resolve(__dirname, "node_modules")
]
2019-05-24 21:28:06 -07:00
},
2019-09-30 16:58:05 -07:00
plugins: [
new CleanWebpackPlugin(),
2019-09-30 16:58:05 -07:00
new CopyPlugin([{
from: "**/*",
to: "."
}]),
new CopyPlugin(
Assets.map(asset => {
return {
from: path.resolve(__dirname, `./node_modules/${asset}`),
to: path.resolve(__dirname, './dist/libraries')
};
})
)
2019-09-30 16:58:05 -07:00
]
};