12345678910111213141516171819202122232425262728293031323334353637383940 |
- const path = require("path");
- const CopyPlugin = require('copy-webpack-plugin');
- module.exports = {
- entry: "./src/app/app.js",
- output: {
- filename: "main.js",
- path: path.resolve(__dirname, 'dist/js')
- },
- module: {
- rules: [
- {
- test: /\.css$/,
- use: ["style-loader", "css-loader"]
- }
- ]
- },
- module: {
- rules: [
- {
- test: /\.js$/,
- exclude: /node_modules/,
- use: {
- loader: "babel-loader"
- }
- }
- ]
- },
- plugins: [
- new CopyPlugin([
- {from:'src/index.html', to:path.resolve(__dirname, 'dist')},
- {from:'node_modules/jquery/dist/jquery.min.js', to:path.resolve(__dirname, 'dist/js')},
- {from:'node_modules/bootstrap/dist/js/bootstrap.min.js', to:path.resolve(__dirname, 'dist/js')},
- {from:'node_modules/konva/konva.min.js', to:path.resolve(__dirname, 'dist/js')},
- {from:'node_modules/bootstrap/dist/css/bootstrap.min.css', to:path.resolve(__dirname, 'dist/css')},
- {from:'src/css/', to:path.resolve(__dirname, 'dist/css')},
- {from:'src/assets/', to:path.resolve(__dirname, 'dist/assets')}
- ])
- ]
- };
|