forked from geolba/tethys.backend
- additional functionality for DatasetController.ts
- additional validation rules like 'uniqueArray' - additional Lucid models like BaseModel.ts for filling attributes, Title.ts, Description.ts - npm updates for @adonisjs/core
This commit is contained in:
parent
c4f4eff0d9
commit
e0ff71b117
44 changed files with 2002 additions and 1556 deletions
|
@ -3,39 +3,39 @@ const Encore = require('@symfony/webpack-encore');
|
|||
const { VueLoaderPlugin } = require('vue-loader');
|
||||
|
||||
const babelLoader = {
|
||||
// test: /\.js$/,
|
||||
test: /\.(js|jsx|ts|tsx)$/,
|
||||
// exclude: /(node_modules|bower_components)/,
|
||||
// exclude: file => (
|
||||
// /node_modules/.test(file) &&
|
||||
// !/\.vue\.js/.test(file)
|
||||
// ),
|
||||
exclude: /node_modules/,
|
||||
use: {
|
||||
loader: 'babel-loader',
|
||||
options: {
|
||||
presets: [
|
||||
// ['@babel/preset-env', {
|
||||
// "targets": "> 0.25%, not dead"
|
||||
// // "targets": {
|
||||
// // "edge": "17",
|
||||
// // "firefox": "60",
|
||||
// // "chrome": "67",
|
||||
// // "safari": "11.1"
|
||||
// // }
|
||||
// }],
|
||||
['@babel/preset-env', {}],
|
||||
'babel-preset-typescript-vue3', //because of new vue setup method
|
||||
// "@babel/preset-typescript"
|
||||
],
|
||||
plugins: [
|
||||
// "@babel/plugin-transform-runtime",
|
||||
['@babel/plugin-proposal-decorators', { legacy: true }],
|
||||
// test: /\.js$/,
|
||||
test: /\.(js|jsx|ts|tsx)$/,
|
||||
// exclude: /(node_modules|bower_components)/,
|
||||
// exclude: file => (
|
||||
// /node_modules/.test(file) &&
|
||||
// !/\.vue\.js/.test(file)
|
||||
// ),
|
||||
exclude: /node_modules/,
|
||||
use: {
|
||||
loader: 'babel-loader',
|
||||
options: {
|
||||
presets: [
|
||||
// ['@babel/preset-env', {
|
||||
// "targets": "> 0.25%, not dead"
|
||||
// // "targets": {
|
||||
// // "edge": "17",
|
||||
// // "firefox": "60",
|
||||
// // "chrome": "67",
|
||||
// // "safari": "11.1"
|
||||
// // }
|
||||
// }],
|
||||
['@babel/preset-env', {}],
|
||||
'babel-preset-typescript-vue3', //because of new vue setup method
|
||||
// "@babel/preset-typescript"
|
||||
],
|
||||
plugins: [
|
||||
// "@babel/plugin-transform-runtime",
|
||||
['@babel/plugin-proposal-decorators', { legacy: true }],
|
||||
|
||||
'@babel/proposal-class-properties',
|
||||
],
|
||||
},
|
||||
},
|
||||
'@babel/proposal-class-properties',
|
||||
],
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
// const Components = require('unplugin-vue-components/webpack')
|
||||
|
@ -47,7 +47,7 @@ const babelLoader = {
|
|||
|--------------------------------------------------------------------------
|
||||
*/
|
||||
if (!Encore.isRuntimeEnvironmentConfigured()) {
|
||||
Encore.configureRuntimeEnvironment(process.env.NODE_ENV || 'dev');
|
||||
Encore.configureRuntimeEnvironment(process.env.NODE_ENV || 'dev');
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -168,23 +168,23 @@ Encore.enableVersioning(Encore.isProduction());
|
|||
|
|
||||
*/
|
||||
Encore.configureDevServerOptions((options) => {
|
||||
/**
|
||||
* Normalize "options.static" property to an array
|
||||
*/
|
||||
if (!options.static) {
|
||||
options.static = [];
|
||||
} else if (!Array.isArray(options.static)) {
|
||||
options.static = [options.static];
|
||||
}
|
||||
/**
|
||||
* Normalize "options.static" property to an array
|
||||
*/
|
||||
if (!options.static) {
|
||||
options.static = [];
|
||||
} else if (!Array.isArray(options.static)) {
|
||||
options.static = [options.static];
|
||||
}
|
||||
|
||||
/**
|
||||
* Enable live reload and add views directory
|
||||
*/
|
||||
options.liveReload = true;
|
||||
options.static.push({
|
||||
directory: join(__dirname, './resources/views'),
|
||||
watch: true,
|
||||
});
|
||||
/**
|
||||
* Enable live reload and add views directory
|
||||
*/
|
||||
options.liveReload = true;
|
||||
options.static.push({
|
||||
directory: join(__dirname, './resources/views'),
|
||||
watch: true,
|
||||
});
|
||||
});
|
||||
|
||||
/*
|
||||
|
@ -268,42 +268,41 @@ Encore.enablePostCssLoader();
|
|||
// // }
|
||||
// })
|
||||
Encore.addLoader({
|
||||
test: /\.vue$/,
|
||||
loader: 'vue-loader',
|
||||
options: {
|
||||
// loaders: {
|
||||
// ts: 'ts-loader',
|
||||
// },
|
||||
cacheDirectory: 'C:\\Users\\kaiarn\\Documents\\Software\\tethys.viewer\\node_modules\\.cache\\vue-loader',
|
||||
cacheIdentifier: 'f930df3e',
|
||||
babelParserPlugins: ['jsx', 'classProperties', 'decorators-legacy'],
|
||||
},
|
||||
})
|
||||
.addPlugin(new VueLoaderPlugin())
|
||||
// .addAliases({
|
||||
// vue$: 'vue/dist/vue.runtime.esm-bundler.js',
|
||||
// });
|
||||
test: /\.vue$/,
|
||||
loader: 'vue-loader',
|
||||
options: {
|
||||
// loaders: {
|
||||
// ts: 'ts-loader',
|
||||
// },
|
||||
cacheDirectory: 'C:\\Users\\kaiarn\\Documents\\Software\\tethys.viewer\\node_modules\\.cache\\vue-loader',
|
||||
cacheIdentifier: 'f930df3e',
|
||||
babelParserPlugins: ['jsx', 'classProperties', 'decorators-legacy'],
|
||||
},
|
||||
}).addPlugin(new VueLoaderPlugin());
|
||||
// .addAliases({
|
||||
// vue$: 'vue/dist/vue.runtime.esm-bundler.js',
|
||||
// });
|
||||
|
||||
Encore.addLoader(babelLoader)
|
||||
// Encore.enableTypeScriptLoader(config => {
|
||||
// // Loader-specific options
|
||||
// config.configFile = 'tsconfig.vue.json';
|
||||
// config.appendTsSuffixTo = [/\.vue$/];
|
||||
// config.transpileOnly = true;
|
||||
// config.happyPackMode = false;
|
||||
// }, {
|
||||
// // Directly change the exclude rule
|
||||
// exclude: /node_modules/,
|
||||
|
||||
// })
|
||||
.addAliases({
|
||||
'@': join(__dirname, 'resources/js'),
|
||||
vue$: 'vue/dist/vue.runtime.esm-bundler.js'
|
||||
})
|
||||
.configureDefinePlugin((options) => {
|
||||
options['__VUE_OPTIONS_API__'] = true;
|
||||
options['__VUE_PROD_DEVTOOLS__'] = false;
|
||||
});
|
||||
// Encore.enableTypeScriptLoader(config => {
|
||||
// // Loader-specific options
|
||||
// config.configFile = 'tsconfig.vue.json';
|
||||
// config.appendTsSuffixTo = [/\.vue$/];
|
||||
// config.transpileOnly = true;
|
||||
// config.happyPackMode = false;
|
||||
// }, {
|
||||
// // Directly change the exclude rule
|
||||
// exclude: /node_modules/,
|
||||
|
||||
// })
|
||||
.addAliases({
|
||||
'@': join(__dirname, 'resources/js'),
|
||||
'vue$': 'vue/dist/vue.runtime.esm-bundler.js',
|
||||
})
|
||||
.configureDefinePlugin((options) => {
|
||||
options['__VUE_OPTIONS_API__'] = true;
|
||||
options['__VUE_PROD_DEVTOOLS__'] = false;
|
||||
});
|
||||
|
||||
// Encore.addAliases({
|
||||
// '@': resolve(__dirname, 'resources/js')
|
||||
|
@ -364,7 +363,7 @@ Encore.addLoader(babelLoader)
|
|||
*/
|
||||
const config = Encore.getWebpackConfig();
|
||||
config.infrastructureLogging = {
|
||||
level: 'warn',
|
||||
level: 'warn',
|
||||
};
|
||||
config.stats = 'errors-warnings';
|
||||
// config.resolve.extensions.push('.vue');
|
||||
|
@ -381,7 +380,7 @@ config.stats = 'errors-warnings';
|
|||
// // // '@': path.resolve(__dirname, 'resources/js'),
|
||||
// // }
|
||||
// };
|
||||
config.resolve.extensions = [ '.tsx', '.ts', '.mjs', '.js', '.jsx', '.vue', '.json', '.wasm'];
|
||||
config.resolve.extensions = ['.tsx', '.ts', '.mjs', '.js', '.jsx', '.vue', '.json', '.wasm'];
|
||||
|
||||
// config.resolve = {
|
||||
// // vue: 'vue/dist/vue.js'
|
||||
|
@ -390,8 +389,6 @@ config.resolve.extensions = [ '.tsx', '.ts', '.mjs', '.js', '.jsx', '.vue', '.js
|
|||
// }
|
||||
// }
|
||||
|
||||
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Export config
|
||||
|
|
Loading…
Add table
editor.link_modal.header
Reference in a new issue