mirror of
https://github.com/xodio/xod.git
synced 2026-03-25 18:16:55 +01:00
54 lines
1.1 KiB
JavaScript
54 lines
1.1 KiB
JavaScript
|
|
const webpack = require('webpack');
|
|
const CopyWebpackPlugin = require('copy-webpack-plugin');
|
|
|
|
module.exports = {
|
|
devtool: 'source-map',
|
|
entry: [
|
|
'babel-polyfill',
|
|
'./app/index.jsx',
|
|
],
|
|
output: {
|
|
filename: 'bundle.js',
|
|
},
|
|
resolve: {
|
|
modulesDirectories: ['node_modules', 'app', 'targets'],
|
|
extensions: ['', '.js', '.jsx', '.scss'],
|
|
},
|
|
module: {
|
|
loaders: [
|
|
{
|
|
test: /app\/.*\.jsx?$/,
|
|
loaders: [
|
|
'babel?presets[]=react,presets[]=es2015',
|
|
],
|
|
},
|
|
{
|
|
test: /\.scss$/,
|
|
loaders: [
|
|
'style',
|
|
'css',
|
|
'autoprefixer?browsers=last 3 versions',
|
|
'sass?outputStyle=expanded',
|
|
],
|
|
},
|
|
{
|
|
test: /assets\/.*\.(jpe?g|png|gif|svg|woff|woff2)$/,
|
|
loaders: [
|
|
'file?name=[path][name].[ext]?[hash:6]&context=./app'
|
|
],
|
|
},
|
|
{
|
|
test: /\.json5$/,
|
|
loader: 'json5',
|
|
},
|
|
],
|
|
},
|
|
plugins: [
|
|
new webpack.NoErrorsPlugin(),
|
|
new CopyWebpackPlugin([
|
|
{ from: 'app/index.html' },
|
|
]),
|
|
],
|
|
};
|