Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Bower to webpack
const path = require('path');
const webpack = require('webpack');
const CopyWebpackPlugin = require('copy-webpack-plugin');
// assets.js
const Assets = require('./assets');
module.exports = {
entry: {
app: "./app.js",
},
output: {
path: __dirname + "/wwwroot/",
filename: "[name].bundle.js"
},
plugins: [
new CopyWebpackPlugin(
Assets.map(asset => {
return {
from: path.resolve(__dirname, `./node_modules/${asset}`),
to: path.resolve(__dirname, './wwwroot/npm')
};
})
)
]
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.