var webpack = require('webpack'); const { VueLoaderPlugin } = require("vue-loader"); const CKEditorWebpackPlugin = require('@ckeditor/ckeditor5-dev-webpack-plugin'); const { styles } = require('@ckeditor/ckeditor5-dev-utils'); var glob = require("glob"); const path = require('path'); module.exports = { mode: 'production', entry: { //"thirdparty": ['qrcode'], //"infxjs": ['./wwwroot/jssrc/qrcodegen.js'], //"jslib": ['clipboard', 'highcharts', 'moment', 'sortablejs', 'underscore'], //"vuelib": ['vue','highcharts-vue'], //"fxlib": [], //"vuecomp": [], "appjs": ['./wwwroot/src/app.js', './wwwroot/jssrc/qrcodegen.js'] }, output: { path: __dirname + "/wwwroot/js/dist/", filename: "[name].js", library: "[name]" }, watchOptions: { aggregateTimeout: 500, // wait for 500ms before building changes poll: 1000 // check every second }, devtool: 'source-map', module: { rules: [ { test: /\.vue$/, loader: "vue-loader" }, { test: /\.js$/, exclude: /node_modules/, loader: 'babel-loader' }, { // Or /ckeditor5-[^/]+\/theme\/icons\/.+\.svg$/ if you want to limit this loader // to CKEditor 5 icons only. test: /ckeditor5-[^\/]+\/theme\/icons\/.+\.svg$/, use: ['raw-loader'] }, { // Or /ckeditor5-[^/]+\/theme\/[\w-/]+\.css$/ if you want to limit this loader // to CKEditor 5 theme only. test: /ckeditor5-[^\/]+\/theme\/[\w-\/]+\.css$/, use: [ { loader: 'style-loader', options: { injectType: 'singletonStyleTag' } }, //{ // loader: 'css-loader', //}, { loader: 'postcss-loader', options: styles.getPostCssConfig({ themeImporter: { themePath: require.resolve('@ckeditor/ckeditor5-theme-lark') }, minify: true }) }, ] }, { test: /\.(png|woff|woff2|eot|ttf|svg)$/, exclude: path.resolve(__dirname, 'node_modules', '@ckeditor'),///node_modules\/\@ckeditor/, //path.resolve(__dirname, 'node_modules', '@ckeditor'), loader: 'url-loader?limit=100000' }, { test: /\.css$/, exclude: path.resolve(__dirname, 'node_modules', '@ckeditor'),///node_modules\/\@ckeditor/, //path.resolve(__dirname, 'node_modules', '@ckeditor'), use: [ 'vue-style-loader', 'css-loader' ] }, ] }, plugins: [ new VueLoaderPlugin(), new CKEditorWebpackPlugin({ // See https://ckeditor.com/docs/ckeditor5/latest/features/ui-language.html language: 'en' }) ] };