30 lines
839 B
JavaScript
30 lines
839 B
JavaScript
/// <binding Clean='Run - Development' />
|
|
//"use strict";
|
|
var path = require('path');
|
|
|
|
module.exports = {
|
|
entry: "./source/index.js",
|
|
output: {
|
|
path: path.resolve(__dirname, "public"),
|
|
publicPath: "/public/",
|
|
filename: "bundle.js"
|
|
},
|
|
module: {
|
|
rules: [
|
|
{ test: /\.css$/, loader: "style-loader!css-loader" },
|
|
{ test: /\.(ttf|svg|png|jpg|eot|woff2|woff)$/, loader: "url-loader" },
|
|
{ test: /\.m?js$/,
|
|
exclude: /(node_modules|brower_components)/,
|
|
use: {
|
|
loader: 'babel-loader',
|
|
options: {
|
|
presets: ['@babel/env', '@babel/react'],
|
|
}
|
|
}
|
|
},
|
|
]
|
|
},
|
|
devServer: {
|
|
historyApiFallback: true
|
|
}
|
|
}; |