UNPKG

@skydive-project/skydive-ui

Version:
76 lines (69 loc) 1.9 kB
const HtmlWebPackPlugin = require("html-webpack-plugin"); const CopyWebPackPlugin = require('copy-webpack-plugin'); var path = require('path'); const htmlPlugin = new HtmlWebPackPlugin({ template: "./src/index.html", filename: "./index.html" }); module.exports = { entry: './src/index.tsx', output: { filename: './dist/bundle.js' }, resolve: { extensions: [".ts", ".tsx", ".js", ".jsx"] }, module: { rules: [ { test: /\.(t|j)sx?$/, use: { loader: 'awesome-typescript-loader' }, exclude: /node_modules/ }, { enforce: "pre", test: /\.js$/, loader: "source-map-loader" }, { test: /\.css$/, use: ["style-loader", "css-loader"] }, { test: /\.(gif|png|jpe?g|svg)$/i, use: [ { loader: 'url-loader', options: { } } ], }, { test: /\.(woff(2)?|ttf|eot|svg)(\?v=\d+\.\d+\.\d+)?$/, use: [ { loader: 'file-loader', options: { name: '[name].[ext]', outputPath: 'fonts/' } } ] }, ] }, devServer: { historyApiFallback: true, contentBase: path.join(__dirname, 'dist'), compress: true, port: 8080 }, devtool: "source-map", plugins: [ htmlPlugin, new CopyWebPackPlugin({ patterns: [ { from: 'assets', to: 'assets' } ] }) ] }