Last active
June 12, 2017 18:34
-
-
Save AndrejsAbrickis/48018a2fef2e8515ea16b1cfcba41348 to your computer and use it in GitHub Desktop.
Bower to webpack
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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