import 'laravel-mix'; import sass from 'sass'; import { Options as TsLoaderOptions } from 'ts-loader'; import * as postcss from 'postcss'; import { Options as _SassLoaderOptions } from 'sass-loader'; import webpack, { Chunk, Module, SortableSet } from 'webpack'; import DependencyLocation = webpack.compilation.DependencyLocation; export { _SassLoaderOptions }; export declare type SassLoaderOptions = _SassLoaderOptions & { sassOptions?: sass.Options; additionalData?: (content: string, loaderContext: webpack.loader.LoaderContext) => string; }; export declare interface LoaderItem { loader: string; options?: any; ident?: null | string; type?: null | string; } export declare interface LoaderItemSass extends LoaderItem { loader: 'sass-loader'; options?: SassLoaderOptions; } export declare interface LoaderItemTs extends LoaderItem { loader: 'ts-loader'; options: Partial; } export declare interface LoaderItemPostcss extends LoaderItem { loader: 'postcss-loader'; options: PostcssOptions; } export declare interface PostcssOptions { /** * Options to pass through to `Postcss`. */ postcssOptions?: postcss.ProcessOptions & { plugins: PLUGIN[]; }; /** * Enables/Disables PostCSS parser support in 'CSS-in-JS' (https://github.com/postcss/postcss-loader#execute) */ execute?: boolean; /** * Enables/Disables generation of source maps (https://github.com/postcss/postcss-loader#sourcemap) */ sourceMap?: boolean; } export declare namespace mix { interface File { /** * Static constructor. * * @param {string} file */ find(file: any): any; /** * Get the size of the file. */ size(): any; /** * Determine if the given file exists. * * @param {string} file */ exists(file: any): any; normalizedOutputPath(): any; /** * Delete/Unlink the current file. */ delete(): any; /** * Get the name of the file. */ name(): any; /** * Get the name of the file, minus the extension. */ nameWithoutExtension(): any; /** * Get the extension of the file. */ extension(): any; /** * Get the absolute path to the file. */ path(): any; /** * Get the relative path to the file, from the project root. */ relativePath(): any; /** * Get the relative path to the file, from the project root. */ relativePathWithoutExtension(): any; /** * Get the absolute path to the file, minus the extension. */ pathWithoutExtension(): any; /** * Force the file's relative path to begin from the public path. * * @param {string|null} publicPath */ forceFromPublic(publicPath: any): any; /** * * @param {string} filePath * @param {string|null} publicPath */ stripPublicDir(filePath: any, publicPath?: any): any; /** * Get the path to the file, starting at the project's public dir. * * @param {string|null} publicPath */ pathFromPublic(publicPath: any): any; /** * Get the path to the file without query string. */ pathWithoutQueryString(): any; /** * Get the base directory of the file. */ base(): any; /** * Determine if the file is a directory. */ isDirectory(): any; /** * Determine if the path is a file, and not a directory. */ isFile(): any; /** * Write the given contents to the file. * * @param {string} body */ write(body: any): any; /** * Read the file's contents. */ read(): any; /** * Calculate the proper version hash for the file. */ version(): any; /** * Create all nested directories. */ makeDirectories(): any; /** * Copy the current file to a new location. * * @param {string} destination */ copyTo(destination: any): any; /** * Minify the file, if it is CSS or JS. */ minify(): Promise; /** * Rename the file. * * @param {string} to */ rename(to: any): any; /** * It can append to the current path. * * @param {string} append */ append(append: any): any; /** * Determine if the file path contains the given text. * * @param {string} text */ contains(text: any): any; /** * Parse the file path. */ parse(): any; } interface Entry { structure: Record; base: string; /** * Fetch the underlying entry structure. */ get(): Record; /** * Get the object keys for the structure. */ keys(): string[]; /** * Add a key key-val pair to the structure. * * @param {string} key * @param {any} val */ add(key: string, val: any): this; /** * Add a new key-val pair, based on a given output path. * * @param {any} val * @param {Object} output * @param {Object} fallback */ addFromOutput(val: any, output: object, fallback: object): this; /** * Add a default entry script to the structure. */ addDefault(): any; hasDefault(): boolean; /** * Build the proper entry name, based on a given output. * * @param {Object} output */ createName(output: object): any; /** * Normalize the given output path. * * @param {Object} output * @param {Object} fallback */ normalizePath(output: File, fallback: object): File; } } declare interface OriginRecord { module: Module; loc: any; request: string; } export declare abstract class Entrypoint extends ChunkGroup { /** * Sets the runtimeChunk for an entrypoint. */ setRuntimeChunk(chunk: Chunk): void; /** * Fetches the chunk reference containing the webpack bootstrap code */ getRuntimeChunk(): null | Chunk; /** * Sets the chunk with the entrypoint modules for an entrypoint. */ setEntrypointChunk(chunk: Chunk): void; /** * Returns the chunk which contains the entrypoint modules * (or at least the execution of them) */ getEntrypointChunk(): Chunk; } export declare interface ChunkGroupOptions { name?: string; preloadOrder?: number; prefetchOrder?: number; } export declare abstract class ChunkGroup { groupDebugId: number; options: ChunkGroupOptions; chunks: webpack.Chunk[]; origins: OriginRecord[]; index: number; /** * when a new chunk is added to a chunkGroup, addingOptions will occur. */ addOptions(options: ChunkGroupOptions): void; /** * returns the name of current ChunkGroup * sets a new name for current ChunkGroup */ name?: string; /** * get a uniqueId for ChunkGroup, made up of its member Chunk debugId's */ readonly debugId: string; /** * get a unique id for ChunkGroup, made up of its member Chunk id's */ readonly id: string; /** * Performs an unshift of a specific chunk */ unshiftChunk(chunk: webpack.Chunk): boolean; /** * inserts a chunk before another existing chunk in group */ insertChunk(chunk: webpack.Chunk, before: webpack.Chunk): boolean; /** * add a chunk into ChunkGroup. Is pushed on or prepended */ pushChunk(chunk: webpack.Chunk): boolean; replaceChunk(oldChunk: webpack.Chunk, newChunk: webpack.Chunk): boolean; removeChunk(chunk: webpack.Chunk): boolean; isInitial(): boolean; addChild(group: ChunkGroup): boolean; getChildren(): ChunkGroup[]; getNumberOfChildren(): number; readonly childrenIterable: SortableSet; removeChild(group: ChunkGroup): boolean; addParent(parentChunk: ChunkGroup): boolean; getParents(): ChunkGroup[]; getNumberOfParents(): number; hasParent(parent: ChunkGroup): boolean; readonly parentsIterable: SortableSet; removeParent(chunkGroup: ChunkGroup): boolean; addAsyncEntrypoint(entrypoint: Entrypoint): boolean; readonly asyncEntrypointsIterable: SortableSet; getBlocks(): any[]; getNumberOfBlocks(): number; hasBlock(block?: any): boolean; readonly blocksIterable: Iterable; addBlock(block: webpack.AsyncDependenciesBlock): boolean; addOrigin(module: Module, loc: DependencyLocation, request: string): void; getFiles(): string[]; remove(): void; sortItems(): void; /** * Sorting predicate which allows current ChunkGroup to be compared against another. * Sorting values are based off of number of chunks in ChunkGroup. */ compareTo(chunkGraph: webpack.ChunkGraph, otherGroup: ChunkGroup): 0 | 1 | -1; getChildrenByOrders(moduleGraph: webpack.ModuleGraph, chunkGraph: webpack.ChunkGraph): Record; /** * Sets the top-down index of a module in this ChunkGroup */ setModulePreOrderIndex(module: Module, index: number): void; /** * Gets the top-down index of a module in this ChunkGroup */ getModulePreOrderIndex(module: Module): number; /** * Sets the bottom-up index of a module in this ChunkGroup */ setModulePostOrderIndex(module: Module, index: number): void; /** * Gets the bottom-up index of a module in this ChunkGroup */ getModulePostOrderIndex(module: Module): number; checkConstraints(): void; getModuleIndex: (module: Module) => number; getModuleIndex2: (module: Module) => number; }