Skip to content

Instantly share code, notes, and snippets.

@AndrejsAbrickis
Last active June 12, 2017 18:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save AndrejsAbrickis/48018a2fef2e8515ea16b1cfcba41348 to your computer and use it in GitHub Desktop.
Save AndrejsAbrickis/48018a2fef2e8515ea16b1cfcba41348 to your computer and use it in GitHub Desktop.
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