Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

vue3-sfc-loader

Package Overview
Dependencies
Maintainers
1
Versions
43
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vue3-sfc-loader - npm Package Compare versions

Comparing version 0.2.19 to 0.2.20

13

CHANGELOG.md
### [0.2.20](https://github.com/FranckFreiburger/vue3-sfc-loader/compare/v0.2.19...v0.2.20) (2020-12-13)
### Features
* **docs:** add stylus example ([1fe4d4f](https://github.com/FranckFreiburger/vue3-sfc-loader/commit/1fe4d4f2f672fc86b27a794fc252a550314a376d))
### Bug Fixes
* **core:** avoid useless template scoped (data-v-...) when (style) scope is not required ([f9c9fe7](https://github.com/FranckFreiburger/vue3-sfc-loader/commit/f9c9fe7f715ef115b697c3388bde30e61b621391))
* **docs:** fix vue3-sfc-loader.js link ([0333913](https://github.com/FranckFreiburger/vue3-sfc-loader/commit/0333913d3bb1c1d77226320c8da71f161f1af1a1))
### [0.2.19](https://github.com/FranckFreiburger/vue3-sfc-loader/compare/v0.2.18...v0.2.19) (2020-12-10)

@@ -3,0 +16,0 @@

19

dist/types/index.d.ts

@@ -16,2 +16,6 @@ interface Cache {

* `vue` must initially be contained in this object.
* [[moduleCache]] is mandatory for the lib but optional for you. If you do not provide it, the lib will automatically add it to the [[options]] object.
* It is recommended to provide a prototype-less object (`Object.create(null)`) to avoid potential conflict with `Object` properties (constructor, __proto__, hasOwnProperty, ...).
​ *
* See also [[options.loadModule]].
*

@@ -21,5 +25,5 @@ * **example:**

* ...
* moduleCache: {
* moduleCache: Object.assign(Object.create(null), {
* vue: Vue,
* },
* }),
* ...

@@ -38,5 +42,8 @@ * ```

* ...
* getFile(url) {
* async getFile(url) {
*
* return fetch(url).then(response => response.ok ? response.text() : Promise.reject(response));
* const res = await fetch(url);
* if ( !res.ok )
* throw Object.assign(new Error(url+' '+res.statusText), { res });
* return await res.text();
* },

@@ -141,2 +148,4 @@ * ...

*
* [[moduleCache]] and [[Options.loadModule]] are strongly related, in the sense that the result of [[options.loadModule]] is stored in [[moduleCache]].
* However, [[options.loadModule]] is asynchronous and may help you to handle modules or components that are conditionally required (optional features, current languages, plugins, ...).
* ```javascript

@@ -222,3 +231,3 @@ * ...

*/
export declare function loadModule(path: string, options?: Options): Promise<Module>;
export declare function loadModule(path: string, options?: Options): Promise<any>;
export {};

@@ -18,3 +18,3 @@ {

"license": "MIT",
"version": "0.2.19",
"version": "0.2.20",
"browserslist": "> 1%, last 2 versions, Firefox ESR, not dead, not ie 11",

@@ -29,3 +29,3 @@ "main": "dist/vue3-sfc-loader.js",

"docs": "cross-env-shell node build/evalHtmlComments.js docs/examples.md $npm_package_version && typedoc --plugin typedoc-plugin-markdown --mode file --tsconfig ./build/tsconfig.json --inputFiles ./src/index.ts --out ./docs/api --readme none --stripInternal --namedAnchors true",
"pushDocs": "yarn run docs && git add docs/ && cross-env-shell git commit -m \\\"chore(docs) v$npm_package_version API docs & examples \\\" docs",
"pushDocs": "yarn run docs && git add docs/ && cross-env-shell git commit -m \\\"chore(docs): v$npm_package_version API docs & examples \\\" docs",
"release": "standard-version --header \"\""

@@ -35,5 +35,3 @@ },

"scripts": {
"prerelease": "yarn run tests",
"postbump": "yarn run pushDocs",
"postcommit": "yarn run build"
"postbump": "yarn run pushDocs && yarn run build && yarn run tests"
}

@@ -69,6 +67,6 @@ },

"stream-browserify": "^3.0.0",
"ts-loader": "^8.0.11",
"ts-loader": "^8.0.12",
"typedoc": "^0.19.2",
"typedoc-plugin-markdown": "^3.1.0",
"typescript": "^4.1.2",
"typedoc-plugin-markdown": "^3.1.1",
"typescript": "^4.1.3",
"url": "^0.11.0",

@@ -78,3 +76,3 @@ "util": "^0.12.3",

"vue": "3.0.4",
"webpack": "^5.10.0",
"webpack": "^5.10.1",
"webpack-bundle-analyzer": "^4.2.0",

@@ -81,0 +79,0 @@ "webpack-cli": "^4.2.0"

@@ -24,3 +24,3 @@ # vue3-sfc-loader

<script src="https://unpkg.com/vue@next"></script>
<script src="https://cdn.jsdelivr.net/npm/vue3-sfc-loader"></script>
<script src="https://cdn.jsdelivr.net/npm/vue3-sfc-loader/dist/vue3-sfc-loader.js"></script>
<script>

@@ -34,5 +34,8 @@

getFile(path) {
async getFile(url) {
return fetch(path).then(res => res.ok ? res.text() : Promise.reject(res));
const res = await fetch(url);
if ( !res.ok )
throw Object.assign(new Error(url+' '+res.statusText), { res });
return await res.text();
},

@@ -69,3 +72,3 @@

## Try It Online
## Try It Online <sub>:test_tube:</sub>

@@ -75,3 +78,3 @@ https://codepen.io/franckfreiburger/project/editor/AqPyBr

## Public API
## Public API <sub>:book:</sub>

@@ -81,3 +84,3 @@ **[loadModule](docs/api/README.md#loadmodule)**(`path`: string, `options`: [Options](docs/api/interfaces/options.md)): Promise\<Module>

## dist/
## dist/ <sub>:package:</sub>

@@ -93,3 +96,3 @@ [![latest bundle version](https://img.shields.io/npm/v/vue3-sfc-loader?label=version)](https://github.com/FranckFreiburger/vue3-sfc-loader/blob/main/CHANGELOG.md)

latest minified version at :
- [jsDelivr](https://www.jsdelivr.com/package/npm/vue3-sfc-loader) CDN: https://cdn.jsdelivr.net/npm/vue3-sfc-loader
- [jsDelivr](https://www.jsdelivr.com/package/npm/vue3-sfc-loader) CDN: https://cdn.jsdelivr.net/npm/vue3-sfc-loader/dist/vue3-sfc-loader.js
- [UNPKG](https://unpkg.com/browse/vue3-sfc-loader/) CDN: https://unpkg.com/vue3-sfc-loader

@@ -99,3 +102,3 @@ - `npm install vue3-sfc-loader` (here: `./node_modules/vue3-sfc-loader/dist/vue3-sfc-loader.js`)

## Build your own version
## Build your own version <sub>:hammer_and_wrench:</sub>

@@ -108,3 +111,3 @@ `webpack --config ./build/webpack.config.js --mode=production --env targetsBrowsers="> 1%, last 2 versions, Firefox ESR, not dead, not ie 11"`

## How It Works
## How It Works <sub>:gear:</sub>

@@ -114,3 +117,3 @@ [`vue3-sfc-loader.js`](https://unpkg.com/vue3-sfc-loader@0.2.16/dist/report.html) = `Webpack`( `@vue/compiler-sfc` + `@babel` )

### more details
### more details <sub>:mag:</sub>

@@ -125,5 +128,6 @@ 1. load the `.vue` file

## Any Questions ?
## Any Questions <sub>:question:</sub>
ask here: https://stackoverflow.com/questions/ask?tags=vue3-sfc-loader (see [previous questions](https://stackoverflow.com/questions/tagged/vue3-sfc-loader))
<!-- ask here: https://stackoverflow.com/questions/ask?tags=vue3-sfc-loader (see [previous questions](https://stackoverflow.com/questions/tagged/vue3-sfc-loader)) -->
[:speech_balloon: ask in Discussions tab](https://github.com/FranckFreiburger/vue3-sfc-loader/discussions)

@@ -133,3 +137,3 @@

see [http-vue-loader](https://github.com/FranckFreiburger/http-vue-loader)
see [http-vue-loader](https://github.com/FranckFreiburger/http-vue-loader) <sub>:zzz:</sub>

@@ -136,0 +140,0 @@ #

@@ -84,2 +84,6 @@ import { posix as Path } from 'path'

* `vue` must initially be contained in this object.
* [[moduleCache]] is mandatory for the lib but optional for you. If you do not provide it, the lib will automatically add it to the [[options]] object.
* It is recommended to provide a prototype-less object (`Object.create(null)`) to avoid potential conflict with `Object` properties (constructor, __proto__, hasOwnProperty, ...).
​ *
* See also [[options.loadModule]].
*

@@ -89,5 +93,5 @@ * **example:**

* ...
* moduleCache: {
* moduleCache: Object.assign(Object.create(null), {
* vue: Vue,
* },
* }),
* ...

@@ -108,5 +112,8 @@ * ```

* ...
* getFile(url) {
* async getFile(url) {
*
* return fetch(url).then(response => response.ok ? response.text() : Promise.reject(response));
* const res = await fetch(url);
* if ( !res.ok )
* throw Object.assign(new Error(url+' '+res.statusText), { res });
* return await res.text();
* },

@@ -223,2 +230,4 @@ * ...

*
* [[moduleCache]] and [[Options.loadModule]] are strongly related, in the sense that the result of [[options.loadModule]] is stored in [[moduleCache]].
* However, [[options.loadModule]] is asynchronous and may help you to handle modules or components that are conditionally required (optional features, current languages, plugins, ...).
* ```javascript

@@ -562,3 +571,3 @@ * ...

compilerOptions: {
scopeId,
scopeId: hasScoped ? scopeId : undefined,
mode: 'module', // see: https://github.com/vuejs/vue-next/blob/15baaf14f025f6b1d46174c9713a2ec517741d0d/packages/compiler-core/src/options.ts#L160

@@ -758,3 +767,3 @@ },

const {
moduleCache = (options.moduleCache = {}),
moduleCache = (options.moduleCache = Object.create(null)),
getFile = throwNotDefined('options.getFile()'),

@@ -761,0 +770,0 @@ addStyle = throwNotDefined('options.addStyle()'),

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc