extensions / sd-3dmodel-loader /webpack.config.js
toto10's picture
5abb6291403b19368a3b842ea4f13b1f23694d90948b2da0ae23e85acf2bb1e9
fb54f6e
raw
history blame
1.27 kB
const path = require('path');
const HtmlWebpackPlugin = require('html-webpack-plugin');
module.exports = {
entry: './src/index.js',
output: {
path: path.join(__dirname, 'dist'),
filename: '3d-model-loader.bundle.js'
},
module: {
rules: [
{
test: /\.(js|jsx)$/,
exclude: /node_modules/,
use: {
loader: 'babel-loader',
options: {
presets: ['@babel/env', '@babel/react']
}
}
},
{
test: /\.css$/,
use: ['style-loader', 'css-loader'],
},
{
test: /\.(png|jpe?g|gif)$/i,
loader: 'url-loader',
options: {
limit: 8192,
name: '[name].[ext]',
outputPath: 'images/',
publicPath: 'images/',
},
},
]
},
devServer: {
contentBase: path.join(__dirname, 'public'),
compress: true,
port: 3000,
},
plugins: [
new HtmlWebpackPlugin({
template: 'public/index.html',
}),
],
};