commit d17946d868b8e2da11e2b72b4d0a19254d8960af Author: Philipp Dieter Date: Sat Jun 22 13:07:44 2024 +0200 Init diff --git a/index.js b/index.js new file mode 100644 index 0000000..0fc8525 --- /dev/null +++ b/index.js @@ -0,0 +1,23 @@ +module.exports = function (content) { + this.cacheable(); + var callback = this.async(); + let resourcePath = + '!!ejs-loader-compiled!pug-plain-loader!vue-loader!' + + this.resourcePath + + '?vue&type=template&id=foobar' + try { + this.importModule( + resourcePath, + {}, + function(err, result) { + if (err) { + return callback(err); + } + callback(null, result()); + } + ); + } catch (error) { + callback(err); + } + return; +}; diff --git a/package.json b/package.json new file mode 100644 index 0000000..d893c7c --- /dev/null +++ b/package.json @@ -0,0 +1,11 @@ +{ + "name": "ejs-pug-vue-resource-loader", + "version": "0.0.1", + "description": "", + "main": "index.js", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "author": "", + "license": "AGPL-3.0-or-later" +}