Forked from an inaccessible project.
-
Wilson JALLET authoredWilson JALLET authored
webpack.config.js 1.06 KiB
const path = require('path');
const nodeExternals = require('webpack-node-externals');
const CopyWebpackPlugin = require('copy-webpack-plugin');
const config = {
entry: './src/index.js',
target: 'node',
node: {
__dirname: false
},
output: {
path: path.resolve(__dirname, 'build'),
publicPath: '/assets/',
filename: 'bundle.js'
},
externals: [nodeExternals()],
module: {
rules: [{
test: /\.js$/,
exclude: /node_modules/,
use: [ 'eslint-loader' ]
},{
test: /\.css$/,
use: ['style-loader', 'css-loader']
},{
test: /\.(png|jpg|ico)$/,
exclude: /node_modules/,
loader: 'file-loader',
options: {
limit: 10000
}
}]
},
plugins: [
new CopyWebpackPlugin([{
from: 'src/css',
to: 'css'
},{
from: 'src/views',
to: 'views'
}]
)
]
};
module.exports = config;