forked from nuxt-community/svg-module
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Options to configure file-loader name property (nuxt-community#75)
* Added options to module to allow changing svg destination emitted with file-loader. Provided default config with default nuxt options for name option in file-loader. * feat: Added options to module to allow changing svg destination emitted with file-loader. Provided default config with default nuxt options for name option in file-loader. * fix: rename file-loader options, adapt to new setup function signature * fix(nuxt-config): replace require with import as module is exported as es6 module * refactor(module): reformat with prettier * feat(README): update README configuration section with fileLoader options Co-authored-by: Alex Troshin <[email protected]>
- Loading branch information
Showing
5 changed files
with
25 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
import svgModule from "../lib/module"; | ||
|
||
export default { | ||
buildModules: [require("../lib/module")], | ||
buildModules: [svgModule], | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
const getFileLoaderDefaultConfig = ({ isDev }) => ({ | ||
name: isDev ? "[path][name].[ext]" : "img/[name].[contenthash:7].[ext]", | ||
}); | ||
|
||
module.exports.getFileLoaderDefaultConfig = getFileLoaderDefaultConfig; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters