nav tabs on admin dashboard

This commit is contained in:
2019-03-07 00:20:34 -06:00
parent f73d6ae228
commit e4f473f376
11661 changed files with 216240 additions and 1544253 deletions

View File

@@ -58,8 +58,17 @@ class Entry {
);
}
let vendorPath = extraction.output
? new File(extraction.output)
let outputPath = extraction.output;
// If the extraction output path begins with a slash (forward or backward)
// then the path from the public directory determined below will be wrong
// on Windows, as a drive letter will be incorrectly prepended to
// (e.g. '/dist/vendor' -> 'C:\dist\vendor').
let startsWithSlash = ['\\', '/'].indexOf(outputPath[0]) >= 0;
outputPath = startsWithSlash ? outputPath.substr(1) : outputPath;
let vendorPath = outputPath
? new File(outputPath)
.pathFromPublic(Config.publicPath)
.replace(/\.js$/, '')
.replace(/\\/g, '/')
@@ -104,7 +113,11 @@ class Entry {
*/
normalizePath(output, fallback) {
// All output paths need to start at the project's public dir.
if (!output.pathFromPublic().startsWith('/' + Config.publicPath)) {
let pathFromPublicDir = output.pathFromPublic();
if (
!pathFromPublicDir.startsWith('/' + Config.publicPath) &&
!pathFromPublicDir.startsWith('\\' + Config.publicPath)
) {
output = new File(
path.join(Config.publicPath, output.pathFromPublic())
);

View File

@@ -1,9 +1,8 @@
let webpack = require('webpack');
let webpackDefaultConfig = require('./webpack-default');
let Entry = require('./Entry');
let webpackRules = require('./webpack-rules');
let webpackPlugins = require('./webpack-plugins');
let webpackDefaultConfig = require('./webpack-default');
process.noDeprecation = true;
@@ -37,7 +36,7 @@ class WebpackConfig {
buildEntry() {
let entry = new Entry();
if (! Mix.bundlingJavaScript) {
if (!Mix.bundlingJavaScript) {
entry.addDefault();
}
@@ -64,12 +63,9 @@ class WebpackConfig {
filename: '[name].js',
chunkFilename: '[name].js',
publicPath: Mix.isUsing('hmr')
? http +
'://' +
Config.hmrOptions.host +
':' +
Config.hmrOptions.port +
'/'
? `${http}://${Config.hmrOptions.host}:${
Config.hmrOptions.port
}/`
: '/'
};
@@ -107,7 +103,7 @@ class WebpackConfig {
*/
buildResolving() {
this.webpackConfig.resolve = {
extensions: ['*', '.js', '.jsx', '.vue'],
extensions: ['*', '.wasm', '.mjs', '.js', '.jsx', '.json', '.vue'],
alias: {
vue$: 'vue/dist/vue.common.js'

View File

@@ -1,7 +1,12 @@
let TerserPlugin = require('terser-webpack-plugin');
let OptimizeCSSAssetsPlugin = require('optimize-css-assets-webpack-plugin');
module.exports = function() {
return {
context: Mix.paths.root(),
mode: Mix.inProduction() ? 'production' : 'development',
entry: {},
output: {},
@@ -16,17 +21,33 @@ module.exports = function() {
timings: false,
children: false,
errorDetails: false,
entrypoints: false,
performance: Mix.inProduction(),
chunks: false,
modules: false,
reasons: false,
source: false,
publicPath: false
publicPath: false,
builtAt: false
},
performance: {
hints: false
},
optimization: Mix.inProduction()
? {
minimizer: [
new TerserPlugin(Config.terser),
new OptimizeCSSAssetsPlugin({
cssProcessorPluginOptions: {
preset: ['default', Config.cssNano]
}
})
]
}
: {},
devtool: Config.sourcemaps,
devServer: {

View File

@@ -5,7 +5,6 @@ let BuildCallbackPlugin = require('../webpackPlugins/BuildCallbackPlugin');
let CustomTasksPlugin = require('../webpackPlugins/CustomTasksPlugin');
let ManifestPlugin = require('../webpackPlugins/ManifestPlugin');
let MockEntryPlugin = require('../webpackPlugins/MockEntryPlugin');
let UglifyJSPlugin = require('uglifyjs-webpack-plugin');
module.exports = function() {
let plugins = [];
@@ -19,14 +18,11 @@ module.exports = function() {
// Activate better error feedback in the console.
plugins.push(
new FriendlyErrorsWebpackPlugin({ clearConsole: Config.clearConsole })
new FriendlyErrorsWebpackPlugin({
clearConsole: Config.clearConsole
})
);
// Add support for webpack 3 scope hoisting.
if (Mix.inProduction()) {
plugins.push(new webpack.optimize.ModuleConcatenationPlugin());
}
// Activate support for Mix_ .env definitions.
plugins.push(
MixDefinitionsPlugin.build({
@@ -36,27 +32,19 @@ module.exports = function() {
})
);
if (!Mix.components.get('version') && Mix.isUsing('hmr')) {
plugins.push(new webpack.NamedModulesPlugin());
}
// Add some general Webpack loader options.
plugins.push(
new webpack.LoaderOptionsPlugin({
minimize: Mix.inProduction(),
minimize: Mix.isUsing('purifyCss') ? false : Mix.inProduction(),
options: {
context: __dirname,
output: { path: './' }
output: {
path: './'
}
}
})
);
// If we're in production environment, with Uglification turned on, we'll
// clean up and minify all of the user's JS and CSS automatically.
if (Mix.inProduction() && Config.uglify) {
plugins.push(new UglifyJSPlugin(Config.uglify));
}
// Handle all custom, non-webpack tasks.
plugins.push(new ManifestPlugin());

View File

@@ -10,7 +10,7 @@ module.exports = function() {
// Add support for loading images.
rules.push({
// only include svg that doesn't have font in the path or file name by using negative lookahead
test: /(\.(png|jpe?g|gif)$|^((?!font).)*\.svg$)/,
test: /(\.(png|jpe?g|gif|webp)$|^((?!font).)*\.svg$)/,
loaders: [
{
loader: 'file-loader',