Git Product home page Git Product logo

parcel-plugin-svelte's Introduction

parcel-plugin-svelte

Build Status

A parcel plugin that enables svelte support

Getting Started

Install dependencies

yarn add svelte parcel-bundler parcel-plugin-svelte @babel/polyfill -D

Update the package.json

Update your package.json to contain these scripts (for more information on these commands, see: https://v1.parceljs.org/cli.html):

{
  "scripts": {
    "start": "parcel index.html",
    "build": "parcel build index.html"
  }
}

Create the files

Create an html file that will be used as the entrypoint, name it index.html:

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <meta http-equiv="X-UA-Compatible" content="ie=edge" />
    <title>Parcel Plugin Svelte Example</title>
  </head>
  <body>
    <div id="demo"></div>

    <!-- This script tag points to the source of the JS file we want to load and bundle -->
    <script src="main.js"></script>
  </body>
</html>

Create a simple JavaScript file named main.js:

import '@babel/polyfill';
import App from './App.svelte';

new App({
  target: document.getElementById('demo'),
  props: {
    name: 'world'
  }
});

Create a Svelte file named App.svelte:

<p>
  Hello { name }, the time is <span class="the-time">{ hours }:{ minutes }:{ seconds }</span>
</p>

<style>
  .the-time {
    font-weight: bold;
  }
</style>

<script>
  import { onMount } from 'svelte';

  export let name = 'Anonymous';
  let time = new Date();

  onMount(() => {
    const timer = setInterval(() => {
      time = new Date();
    }, 1000)

    return () => {
      clearInterval(timer);
    }
  })

  let hours, minutes, seconds;

  $: {
    hours = time.getHours();
    minutes = time.getMinutes();
    seconds = time.getSeconds();
  }
</script>

Further reading

To continue your journey into Svelte and Parcel please have a look at their documentation:

for configuring this plugin, please read #Configuration

Configuration

The default configuration should work for most people but for anyone who would like to change the way svelte compiles the files there is the possibility to configure it.

This can be done though a svelte.config.js file, .svelterc file or svelte field in package.json.

For documentation on which parameters you can set and use look at the official svelte docs.

// Used by svelte.compilerOptions
compilerOptions: {
  ...
},
// Used by svelte.preprocess
preprocess: {
  ...
}

Note: the use of compiler property will be deprecated on the next major version, you should use thecompilerOptions property instead.

CSS CompilerOptions

If you set compilerOptions.css to false, CSS will be bundled in a separate file. It also enables post-transformations provided by Parcel such as PostCSS and file resolution for url().

How does it work?

If you want to know how it works have a look at my article about this plugin, might help if you wanna fix a bug or write your own parcel-plugin.

Any more questions?

Any more questions about how the plugin works internally or how to use it? Feel free to open an issue in the repository.

License

This project is licensed under the MIT License

parcel-plugin-svelte's People

Contributors

0x13r avatar akihikodaki avatar antony avatar asadm avatar canadaduane avatar demoorjasper avatar dependabot-preview[bot] avatar dependabot[bot] avatar guytepper avatar hexium310 avatar iamharky avatar jeffreypalmer avatar kaisermann avatar milesq avatar orlov-vo avatar petercr avatar rijkvanzanten avatar rogueg avatar samuelgozi avatar sarioglu avatar sunify avatar tivac avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

parcel-plugin-svelte's Issues

Don't depend on svelte

Svelte v2 has been released, and the syntax is quite different.

I wonder if it makes more sense to, rather than declare a dependency on svelte, leave it to the end user.

I'm making a huge assumption here that nothing in the plugin binds you to svelte v1, or rather, any specific version of svelte.

Thoughts?

Doesn't seem to work any more

๐Ÿ› Bug Report

๐ŸŽ› Configuration (.svelterc, package.json, cli command)

Upgraded all my projects and none of them work any more, with the error component Xxx is not a function

If you simply clone this project and then point parcel at the index.html file, you will notice that you get the same error:

๐Ÿ’ป Code Sample

โžœ  npx parcel index.html
Server running at http://localhost:1234 
โœจ  Built in 2.35s.

In your browser console:

component.svelte:22 Uncaught TypeError: (0 , _component2.default) is not a function
    at Object.parcelRequire.4../components/app/component.svelte (component.svelte:22)
    at newRequire (main.5ce53338.js:48)
    at parcelRequire.12 (main.5ce53338.js:75)
    at main.5ce53338.js:80
parcelRequire.4../components/app/component.svelte @ component.svelte:22
newRequire @ main.5ce53338.js:48
parcelRequire.12 @ main.5ce53338.js:75
(anonymous) @ main.5ce53338.js:80

๐ŸŒ Your Environment

This project's exact dependencies, and NodeJS 9.10.1

HMR causes component styles to disappear

๐Ÿ› Bug Report

HMR works but loses inline styles until you refresh the whole page.

๐ŸŽ› Configuration

See https://github.com/beyonk-adventures/svelte-parcel-hmr-issue

๐Ÿ’ป Code Sample

See https://github.com/beyonk-adventures/svelte-parcel-hmr-issue

If you npm i then npm run dev you will see the time, in green, in realtime.

If you then change the component's CSS to 'red' rather than 'green', you will actually lose all component defined styles until you refresh the page (font will become normal instead of bold, and black).

Upon refresh your style will have updated and you will see the time in red.

Worth noting - this might be caused by the fix for the other issue #15 whereby multiple css files added to parcel's tree were causing styles to be overwritten.

๐ŸŒ Your Environment

See package.json for versions
Ubuntu 18.10
Chrome Version 68.0.3440.106 (Official Build) (64-bit)

External deps resolution fails

๐Ÿ› Bug Report

Seems like Parcel does not bundle Svelte internals correctly for external packages that rely on them. Everything builds correctly, but then I get a clientside error:

Uncaught TypeError: store.subscribe is not a function
    at Object.subscribe (index.mjs:41)
    at V (yrv.min.js:1)
    at Object.init (index.mjs:1350)
    at new W (yrv.min.js:1)
    at create_fragment (App.svelte:236)
    at init (index.mjs:1364)
    at new App (App.svelte:300)
    at Object.parcelRequire.main.js../App.svelte (main.js:3)
    at newRequire (main.1f19ae8e.js:47)
    at main.1f19ae8e.js:81

External package in question: https://github.com/pateketrueke/yrv

I think it's a Parcel error because it works fine with Rollup. Per default Parcel grabs pkg.browser entry and if that doesn't exist it grabs pkg.module. Both of them give the same error. However, in external package there is also pkg.svelte that points to the raw source. When pointing to that entry (removing pkg.browser and manually pointing pkg.module to src/index.js directly in node_modules dir) everything works.

From what I saw in Svelte plugin code pkg.svelte is used for compiler options. I am also not aware of any bundler that uses pkg.svelte entry point during package resolution and I don't know what is considered a standard, so TBH I am not sure why the author put it there in the first place and what purpose it serves.

๐ŸŽ› Configuration (.svelterc, package.json, cli command)

Available in code sample.

To reproduce run the command below and check the browser's dev console:

yarn parcel serve src/index.html --port 3000 --log-level 4 --no-cache

๐Ÿ’ป Code Sample

https://github.com/iljoo/svelte-parcel-yrv-bug

๐ŸŒ Your Environment

Yarn, plus latest and greatest Parcel and Svelte.

When calling onMount, afterUpdate, etc. receiving "Uncaught Error: Function called outside component initialization"

๐Ÿ› Bug Report

When calling lifecycle methods such as onMount, afterUpdate, etc., I receive the following error and nothing is rendered:

internal.mjs:520 Uncaught Error: Function called outside component initialization
    at get_current_component (internal.mjs:520)
    at afterUpdate (internal.mjs:533)
    at instance (Engine.svelte:82)
    at init (internal.js:1374)
    at new Engine (Engine.svelte:112)
    at create_fragment (App.svelte:14)
    at init (internal.js:1385)
    at new App (App.svelte:49)
    at Object.parcelRequire.main.js../App.svelte (main.js:3)
    at newRequire (main.1f19ae8e.js:47)

๐ŸŽ› Configuration (.svelterc, package.json, cli command)

package.json:

{
  "name": "svelte-3-example",
  "main": "index.html",
  "version": "3.0.0",
  "license": "MIT",
  "private": true,
  "scripts": {
    "start": "parcel index.html --no-cache --no-hmr"
  },
  "dependencies": {
    "parcel-bundler": "^1.11.0",
    "parcel-plugin-svelte": "^3.0.0",
    "svelte": "^3.0.0"
  },
  "browserslist": [
    "last 1 chrome versions"
  ]
}

๐Ÿ’ป Code Sample

App.svelte:

<p>
  Hello { name }, the time is <span class="the-time">{ hours }:{ minutes }:{ seconds }</span>
</p>

<style>
  .the-time {
    font-weight: bold;
  }
</style>

<script>
	import { onMount } from 'svelte'
	
	export let name = 'Anonymous'
	let time = new Date()
	
	onMount(() => {
		const timer = setInterval(() => {
			time = new Date()
		}, 1000)
		
		return () => {
			clearInterval(timer)
		}
	})
	
	let hours, minutes, seconds
	
	$: {
		hours = time.getHours()
		minutes = time.getMinutes()
		seconds = time.getSeconds()
	}
</script>

main.js:

const App = require('./App.svelte');

const app = new App({
  target: document.getElementById('demo'),
  data: {
    name: 'world'
  }
});

๐ŸŒ Your Environment

Svelte: 3.0.0
Parcel: 1.11.0
Parcel Plugin Svelte: 3.0.0

<ComponentName> is not a constructor when nesting components

๐Ÿ› Bug Report

๐ŸŽ› Configuration (.svelterc, package.json, cli command)

  "devDependencies": {
    "parcel-bundler": "^1.8.1",
    "parcel-plugin-svelte": "^1.1.6",
    "svelte": "^2.7.0"
  }

command:

    "start": "parcel --log-level 3 ./index.html"

๐Ÿ’ป Code Sample

Seems to reproduce every time I edit any part of the project. The first time I start the parcel process, it compiles, and then making a change or stopping + starting the parcel process, causes the project to stop working, and the following error to be shown in the console:

problem

The problem is that to resolve this error so that I can continue working, I need some sort of combination of:

  • commenting out its usage in the parent componentre
  • deleting it and recreating it
  • renaming the component and all its uses to something else
  • deleting the .cache directory

but there is no definitive combination which appears to fix it. It's basically impossible to work on my project now.

๐ŸŒ Your Environment

See svelte + parcel version above
Ubuntu Linux 17.10

Project to reproduce

I've created a simple example project.

Support svelte store configuration

If there is no significant cost to adding the store: true option to the Svelte compilation options, perhaps its fine then to always enable it.

Unrecognized option 'store'

๐Ÿ› Bug Report

While trying to compile with Parcel, I get this error for App.svelte and I'm unsure what it's referring to...

๐ŸŽ› Configuration (.svelterc, package.json, cli command)

no configuration!

๐Ÿ’ป Code Sample

I only have 2 files, main.js:

import App from './App.svelte';

const app = new App({
	target: document.body,
	props: {
		name: 'world'
	}
});

window.app = app;

export default app;

and App.svelte:

<script>
	export let name;
</script>

<style>
	h1 {
		color: purple;
	}
</style>

<h1>Hello {name}!</h1>

package.json:

{
  "name": "test-svelte-app-parcel",
  "version": "1.0.0",
  "main": "index.js",
  "license": "MIT",
  "scripts": {
    "dev": "parcel src/main.js",
    "build": "parcel build src/main.js"
  },
  "devDependencies": {
    "parcel-bundler": "^1.12.3",
    "parcel-plugin-svelte": "^2.1.0-alpha-0"
  },
  "dependencies": {
    "svelte": "^3.0.0"
  }
}

๐ŸŒ Your Environment

svelte: ^3.0.0
parcel-bundler: ^1.12.3

Remove support of svelte preprocessor settings

๐Ÿ™‹ Feature Request

Detailed description

I don't think there is any need to pass options to or run the Svelte preprocessor.
As stated in the official docs for Svelte, it is mainly intended for transpilation, for example of less to css.
But since parcel itself can take care of this kind of stuff, I see no reason for letting svelte do it instead, In addition, it might be counterproductive performance-wise to let it do it.

We should just pass the assets generated from the compilation to parcel.
I can do the refactor if it is accepted.

Support for Parcel v2?

๐Ÿ™‹ Feature Request

Detailed description

Will this plugin support Parcel v2 anytime soon?

The README contains no details about the compatible Parcel versions; I suppose that it is currently targeting Parcel v1 only, as I am getting errors when trying to build .svelte files with Parcel v2?

Components give errors when first imported

parcel-bundler (global), parcel-plugin-svelte (dev), svelte-router (dev)

I have an example here:

When I run that as per the description I get this:

Uncaught TypeError: createRouter is not a function

If I comment out all the svelte-router stuff then I get similar errors:

Uncaught TypeError: Page1 is not a constructor

However, if I comment all the imports and their references out, then it works.

And then, if I add them back one by one without turning off the development server they start working as intended. What is going on here?

HMR - Component Duplicated on Reload

Just started testing Parcel using Svelte. Wanted to use HMR so added

if (module.hot) { module.hot.accept() }

to main.js (doesn't matter where I add this) but got the same symptoms as that reported in #31 with output being appended on save. It's not just when editing the main.js though, any save on the svelte component causes the output to be appended.

See example - https://github.com/pfazzino/parcelsveltetest

Resolve tilde paths

๐Ÿ› Bug Report

Resolve tilde paths according to https://parceljs.org/module_resolution.html#~-tilde-paths

๐ŸŽ› Configuration (.svelterc, package.json, cli command)

No .svelterc

{
  "name": "braze-templates",
  "author": {
    "email": "[email protected]",
    "name": "Niccolo Borgioli",
    "url": "https://nicco.io"
  },
  "private": true,
  "version": "0.0.1",
  "scripts": {
    "start": "node helper.js",
    "build:app": "parcel build app/client/index.html --target electron -d app/client/dist --public-url .",
    "pack:macos": "yarn run build:app && electron-builder --macos"
  },
  "main": "./app/server.js",
  "browserslist": [
    "last 1 chrome versions",
    "last 1 safari versions"
  ],
  "build": {
    "appId": "com.lovoo.braze.templates"
  },
  "files": [
    "app",
    "templates"
  ],
  "devDependencies": {
    "@fullhuman/postcss-purgecss": "^2.3.0",
    "argparse": "^2.0.0",
    "electron": "^9.2.1",
    "electron-builder": "^22.8.0",
    "enquirer": "^2.3.6",
    "parcel-plugin-svelte": "^4.0.6",
    "svelte": "^3.24.1"
  },
  "dependencies": {
    "archiver": "^5.0.0",
    "chota": "^0.8.0",
    "electron-context-menu": "^2.3.0",
    "electron-window-state": "^5.0.3",
    "glob": "^7.1.6",
    "mustache": "^4.0.1",
    "parcel-bundler": "^1.12.4",
    "serve-handler": "^6.1.3",
    "shelljs": "^0.8.4",
    "svelte-chota": "^1.7.1",
    "tailwindcss": "^1.7.1"
  }
}

Svelte config, parcel config, command, ...

๐Ÿ’ป Code Sample

Code sample, example repo

๐ŸŒ Your Environment

Svelte version, Parcel version

Class constructor SvelteComponent cannot be invoked without 'new'

๐Ÿ› Bug Report

Hi, got some strange error with a basic "Hello world" app.

Class constructor SvelteComponent cannot be invoked without 'new', pointing my app.js

๐ŸŽ› Configuration (.svelterc, package.json, cli command)

Nothing special.

๐Ÿ’ป Code Sample

Everything's in the repo, but the code is quite simple :

import App from "./components/app.svelte";

const root = new App({
    target: document.querySelector("#root"),
    props: {},
});

export default root;

and the app.svelte is:

<script>
	let name = 'world';
</script>

<h1>Hello {name.toUpperCase()}!</h1>

๐ŸŒ Your Environment

Svelte version ^3.1.0, Parcel version ^1.12.3, plugin version 3.0.0


Thanks in advance!

Build silently failing (ERR_PACKAGE_PATH_NOT_EXPORTED)

๐Ÿ› Bug Report

The bug specifically is in sveltejs/svelte#5659, which is strictly not due to this plugin, but parcel build failed without changing the exit code, so this caused my CI to deploy a broken built file.

I don't know if this is a problem with Parcel not setting the exit code or this plugin reporting it as a warning.

๐ŸŽ› Configuration (.svelterc, package.json, cli command)

parcel build --public-url ./ demo/index.html

โš ๏ธ  Parser "parcel-plugin-svelte/lib/svelte-asset.js" failed to initialize when processing asset "demo/App.svelte". Threw the following error:
Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: Package subpath './compiler.js' is not defined by "exports" in /home/runner/work/github-url-detection/github-url-detection/node_modules/svelte/package.json
    at throwExportsNotFound (internal/modules/esm/resolve.js:290:9)
    at packageExportsResolve (internal/modules/esm/resolve.js:513:3)
    at resolveExports (internal/modules/cjs/loader.js:432:36)
    at Function.Module._findPath (internal/modules/cjs/loader.js:472:31)
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:867:27)
    at Function.Module._load (internal/modules/cjs/loader.js:725:27)
    at Module.require (internal/modules/cjs/loader.js:952:19)
    at require (/home/runner/work/github-url-detection/github-url-detection/node_modules/v8-compile-cache/v8-compile-cache.js:159:20)
    at Object.<anonymous> (/home/runner/work/github-url-detection/github-url-detection/node_modules/parcel-plugin-svelte/lib/svelte-asset.js:2:33)
    at Module._compile (/home/runner/work/github-url-detection/github-url-detection/node_modules/v8-compile-cache/v8-compile-cache.js:192:30) falling back to RawAsset
โš ๏ธ  Parser "parcel-plugin-svelte/lib/svelte-asset.js" failed to initialize when processing asset "demo/App.svelte". Threw the following error:
Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: Package subpath './compiler.js' is not defined by "exports" in /home/runner/work/github-url-detection/github-url-detection/node_modules/svelte/package.json
    at throwExportsNotFound (internal/modules/esm/resolve.js:290:9)
    at packageExportsResolve (internal/modules/esm/resolve.js:513:3)
    at resolveExports (internal/modules/cjs/loader.js:432:36)
    at Function.Module._findPath (internal/modules/cjs/loader.js:472:31)
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:867:27)
    at Function.Module._load (internal/modules/cjs/loader.js:725:27)
    at Module.require (internal/modules/cjs/loader.js:952:19)
    at require (/home/runner/work/github-url-detection/github-url-detection/node_modules/v8-compile-cache/v8-compile-cache.js:159:20)
    at Object.<anonymous> (/home/runner/work/github-url-detection/github-url-detection/node_modules/parcel-plugin-svelte/lib/svelte-asset.js:2:33)
    at Module._compile (/home/runner/work/github-url-detection/github-url-detection/node_modules/v8-compile-cache/v8-compile-cache.js:192:30) falling back to RawAsset
โœจ  Built in 1.98s.

dist/App.0a75e0c7.svelte        1.93 KB    509ms
dist/main.127a4158.js           1.47 KB    772ms
dist/global.8961bae3.css.map      847 B      4ms
dist/index.html                   714 B    1.09s
dist/main.127a4158.js.map         554 B      1ms
dist/global.8961bae3.css          388 B    778ms

๐Ÿ’ป Code Sample

Every build is affected, but in my case the issue was on https://github.com/fregante/github-url-detection (but was avoided by forcing an older version of Svelte)

๐ŸŒ Your Environment

Node 14.4.0

{
	"parcel-bundler": "^1.12.4",
	"parcel-plugin-svelte": "^4.0.6",
	"svelte": "3.29.6" // This version is broken
}

Console warnings appear in production but not in dev

๐Ÿ› Bug Report

๐ŸŽ› Configuration (.svelterc, package.json, cli command)

With the default config - which should default to svelte: {dev: false} according to the docs (https://svelte.dev/docs#svelte_compile) - I am not seeing any console.warn calls coming from Svelte in development when it's serving locally via a websocket and hot reload. However, when I run parcel build and use the output JS file like I do in production, then a bunch of warnings I didn't know about appear.

I believe this is backwards from what it should be, and I think the issue is this line (https://github.com/DeMoorJasper/parcel-plugin-svelte/blob/master/packages/parcel-plugin-svelte/lib/svelte-asset.js#L17):

dev: this.options.production

I'm betting there's supposed to be a ! in there to negate it.

Even if that's not the case, in development my console is clear, but in production I'm seeing things like <Component> was created without expected prop 'prop' and <Component> was created with unknown prop 'prop'

๐ŸŒ Your Environment

On Svelte 3.9.2, Parcel 1.12.3, and plugin 4.0.3

This plugin has been really useful! Let me know what else I can do to help.

Unable to get working with latest versions

๐Ÿ› Bug Report

I'm getting

Uncaught TypeError: Cannot read property 'parentNode' of undefined
    at detachNode (hot-api.js:47)
    at Object.d (hot-api.js:47)
    at App.destroy (hot-api.js:47)
    at proxyComponent.destroy (proxy.js:108)
    at Object.parcelRequire.src/main.js../App.svelte (main.js:7)
    at newRequire (main.1e43358e.js:49)
    at main.1e43358e.js:81
    at main.1e43358e.js:107

๐ŸŽ› Configuration (.svelterc, package.json, cli command)

  "devDependencies": {
    "parcel-bundler": "^1.10.3",
    "parcel-plugin-svelte": "^2.0.0",
    "svelte": "^2.15.3"
  }

When using .html instead of .svelte I'm getting an error about App not being a constructor.

The entire app is basically

main.js

import App from './App.svelte';

const app = new App({
  target: document.querySelector('render')
});

app.destroy();

and

App.svelte

<h1>Hi</h1>

Cannot find module './lib/index' (npm package)

๐Ÿ› Bug Report

Details: npm runkit (with node 6)

๐ŸŽ› Configuration (.svelterc, package.json, cli command)

Svelte config, parcel config, command, ...

๐Ÿ’ป Code Sample

Code sample, example repo

๐ŸŒ Your Environment

Svelte version, Parcel version

Parcel/Svelte: styles are duplicated

๐Ÿ› Bug Report

Styles are being duplicated. In a Svelte component likeโ€ฆ

<div></div>>

<style>
  div {
    background: red;
    width: 100px;
    height: 100px;
  }
</style>

โ€ฆDevTools shows these styles:
image

Seems to be related to sveltejs/sapper#1127.

๐ŸŽ› Configuration (.svelterc, package.json, cli command)

package.json:

{
  "scripts": {
    "start": "parcel index.html"
  },
  "devDependencies": {
    "parcel-bundler": "^1.12.4",
    "parcel-plugin-svelte": "^4.0.6",
    "svelte": "^3.21.0"
  }
}

No extra configuration in Svelte rendering.

๐Ÿ’ป Code Sample

Example repo: @jsonkao/svelte-parcel-duplicate-styles

Problem with static files path

๐Ÿ› Bug Report

Hello, thank you for your work at that plugin. Have some issue with load static files(svg, png and etc.)
After compiling, I get the wrong path .JS and .CSS file

๐ŸŽ› Configuration (.svelterc, package.json, cli command)

.svelterc - empty

package.json:
"devDependencies": {
"@babel/cli": "^7.7.0",
"@babel/core": "^7.7.4",
"@babel/plugin-transform-runtime": "^7.7.4",
"@babel/preset-env": "^7.7.4"
"autoprefixer": "^9.7.2",
"babel-eslint": "^10.0.3",
"babel-loader": "^8.0.6",
"babel-plugin-module-resolver": "^3.2.0",
"eslint": "^6.7.0",
"eslint-config-airbnb": "^18.0.1",
"eslint-plugin-import": "^2.18.2",
"parcel-bundler": "^1.12.4",
"parcel-plugin-clean-dist": "0.0.6",
"parcel-plugin-svelte": "^4.0.5",
"stylelint-config-recommended": "^3.0.0",
"stylint": "^2.0.0",
"svelte": "^3.16.0"
},
"dependencies": {},
"scripts": {
"build": "BABEL_ENV=production parcel build src/index.html",
"start": "parcel src/index.html -p 3000"
},
"browserslist": [
"last 2 chrome versions"
],
"alias": {
"shared": "./src/shared"
}
}

๐Ÿ’ป Code Sample

Screenshot 2019-12-01 at 19 38 44

Screenshot 2019-12-01 at 19 41 33

๐ŸŒ Your Environment

Svelte version 3.16.0, parcel-bundler version 1.12.4

Duplicate svelte/internals leads to various errors

๐Ÿ› Bug Report

This is a bit difficult to track down, so let me outline a few pieces to the puzzle.

First, the error I'm getting is

Uncaught (in promise) TypeError: Cannot read property 'c' of undefined
    at transition_out (index.mjs:785)
    at Object.outro [as o] (Mirror.svelte:1127)
    at transition_out (index.mjs:793)
    at Object.outro [as o] (SampleApp.svelte:83)
    at transition_out (index.mjs:793)
    at Object.update [as p] (SampleApp.svelte:249)
    at update (index.mjs:741)
    at flush (index.mjs:709)

This appears to be the same issue as reported here and here.

Like the other issues reported above, I'm importing a svelte component from another npm package. Both the parent project and the child package happen to be my own. I believe what's happening is that two copies of svelte/internals is being loaded, and the resulting error message (again, above) is a symptom.

One solution proposed for webpack is to use resolve.mainFields. Is there an equivalent directive in parceljs?

Is there another way to direct parceljs to use only one copy of svelte/internals?

๐ŸŒ Your Environment

Svelte version: 3.29.0

Parcel version: 1.12.4

Syntax error doesn't tell Svelte how to indicate line number

๐Ÿ› Bug Report

When I have a syntax error in a svelte file, the error message does not indicate which line to look at.

For example, in the script section of a svelte file, I began a "$:" line, but didn't finish it (leave it dangling, with no statement following the "$:"). This is a syntax error. I received the following error message when compiling:

๐Ÿšจ  /Users/duane/Projects/relm/src/audiovideo/Conference.svelte: Unexpected token
    at error$1 (/Users/duane/Projects/relm/node_modules/svelte/compiler.js:15595:20)
    at Parser$1.error (/Users/duane/Projects/relm/node_modules/svelte/compiler.js:15671:10)
    at Parser$1.acorn_error (/Users/duane/Projects/relm/node_modules/svelte/compiler.js:15665:15)
    at Object.read_script [as read] (/Users/duane/Projects/relm/node_modules/svelte/compiler.js:7377:17)
    at tag (/Users/duane/Projects/relm/node_modules/svelte/compiler.js:14737:34)
    at new Parser$1 (/Users/duane/Projects/relm/node_modules/svelte/compiler.js:15630:22)
    at parse$3 (/Users/duane/Projects/relm/node_modules/svelte/compiler.js:15761:21)
    at compile (/Users/duane/Projects/relm/node_modules/svelte/compiler.js:26931:18)
    at SvelteAsset.generate (/Users/duane/Projects/relm/node_modules/parcel-plugin-svelte/lib/svelte-asset.js:43:25)

See sveltejs/svelte#5411

๐Ÿ’ป Code Sample

Leave a dangling $: somewhere inside the <script> section of a .svelte file to generate a syntax error.

๐ŸŒ Your Environment

Svelte: 3.23.2

Nested import error: TypeError: "header.$$ is undefined".

๐Ÿ› Bug Report

Nested import error: TypeError: "header.$$ is undefined".
Without import app works normally, with import I get this error.

๐ŸŽ› Configuration

{
  "name": "sveltetest",
  "version": "1.0.0",
  "description": "",
  "main": "index.html",
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1"
  },
  "browserslist": [
    "last 1 chrome versions",
    "last 1 firefox version"
  ],
  "author": "Janealter",
  "license": "ISC",
  "devDependencies": {
    "@babel/polyfill": "^7.4.4",
    "parcel-bundler": "^1.12.3",
    "parcel-plugin-svelte": "^3.0.1",
    "svelte": "^3.4.4"
  }
}

Commands:
./node_modules/parcel-bundler/bin/cli.js index.html --no-cache;
./node_modules/parcel-bundler/bin/cli.js index.html;
parcel index.html;
parcel index.html --no-cache

๐Ÿ’ป Code Sample

./index.html

<!DOCTYPE html> 
<html lang="en">
  <head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>Svelte Test</title>
  </head>
  <body>
    <main></main>
    <script src="src/index.js"></script>
  </body>
</html>

./src/index.js

import '@babel/polyfill';
import App from './App';

const app = new App({
  target: document.querySelector('main'),
  data: {},
});

./src/App.svelte

<script>
  import Header from './components/Header';

  const name = 'Test';
</script>

<p>{name}</p>
<Header/>

./src/components/Header.svelte

<header>
  <p>Test text</p>
</header>

๐ŸŒ Your Environment

Svelte 3.4.4, Parcel 1.12.3

Parcel 2

๐Ÿ™‹ Feature Request

Detailed description

Would be so lovely to support parcel v2. Its can be used by installing the module parcel@next instead of parcel-bundler

Similar to an existing solution?

Should work the same way as now (great)

Possible work-around?

Well... if we downgrade parcel to 1.x it works.

Related to a problem?

When I copy all the example code from the readme but uses parcel@next as bundler I get this when I yarn start

โš ๏ธ  Parser "parcel-plugin-svelte/lib/svelte-asset.js" failed to initialize when processing asset "App.svelte". Threw the following error:
โ ‹ Building...TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received type object
    at validateString (internal/validators.js:112:11)    at Object.resolve (path.js:981:7)
    at /Users/mrw/simple/node_modules/parcel/lib/cli.js:88:39

I was noticing huge bundle sizes for my app until I used --experimental-scope-hoisting

๐Ÿ™‹ Feature Request

I'm hoping a reference could be made somewhere in the docs to the possibility of seeing larger bundle sizes than one might've noticed using a rollup config. Or I suppose there's a possibility @DeMoorJasper might know why bundle sizes might be getting larger with a parcel approach than the rollup approach. Either way, I'm grateful for this plugin and expect more and more people will start using it as Svelte gets more popular.

Detailed description

My prod bundles were nearly 3X the size using parcel (and this plugin) than they were when I was used rollup.

Similar to an existing solution?

I could not find the right combinations of configs to get my bundles sizes small again.

Possible work-around?

I came across the --experimental-scope-hoisting flag in parcel's docs and it drastically reduced by bundle sizes again and my app still worked!

Related to a problem?

I assume is has something do with svelte things not getting de-duped or something but did not dig into it very far.

Support .html imports

Waiting on parcel to add any way to do this without overwriting the default html asset processing, as this would break any html file

Svelte files are not watched

Not sure if this is specific to this plugin or to parcel as a whole, but if I edit say main.js, my files are auto-reloaded and I see the changes immediately in the browser. If I edit a .svelte component however, they are not.

Should I be raising this here, or in the main project?

How to import nested component

Hey nice work for creating this plugin!
But I am not able to import a component inside a component...
Getting Cannot find module './header.svelte' in the browser console ...

Root component gets duplicated when index.js is saved

๐Ÿ› Bug Report

The root component gets duplicated when the file where the component is created is saved.

duplicate_component

๐ŸŽ› Configuration (.svelterc, package.json, cli command)

Parcel with the parcel-plugin-svelte plugin.

{
  "scripts": {
    "start": "parcel ./src/index.html"
  },
  "devDependencies": {
    "parcel-bundler": "^1.10.3",
    "parcel-plugin-svelte": "^1.2.3"
  },
  "dependencies": {
    "svelte": "^2.14.3"
  }
}

๐Ÿ’ป Code Sample

Open the minimal reproducible example, run the outlined commands in the README, and save the src/index.js file.

Parcel cache

(question)

Detailed description

In your example there is --no-cache cli parameter.

Is it possible to use the parcel cache with the parcel-plugin-svelte ?

Thanks for your work!

Can't define config

I have a svelte.config.js in the root of my project but nothing I put in the file seems to have any effect.

const less = require('svelte-preprocess-less')

module.exports = {
  preprocess: {
     style: less()
  }
}

changes required to use

This is a question.

What changes do we need to make in the package.json npm scripts of our Svelte projects in order to use this? Presumably these need to change:

    "build": "rollup -c",
    "dev": "rollup -c -w",

Symbols "<" and ">" in html content return "Expected valid tag name"

๐Ÿ› Bug Report

๐ŸŽ› Configuration

{
  "name": "svelte-test",
  "version": "1.0.0",
  "description": "",
  "main": "index.js",
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1"
  },
  "author": "",
  "license": "ISC",
  "dependencies": {
    "svelte": "^3.6.1"
  },
  "devDependencies": {
    "parcel-bundler": "^1.12.3",
    "parcel-plugin-svelte": "^3.0.1"
  }
}

Command: parcel watch index.js

๐Ÿ’ป Code Sample

<div class="left-control"> < </div>
<div class="right-control"> > </div>

๐ŸŒ Your Environment

Svelte 3.6.1, Parcel 1.12.3

Doesn't work with global parcel install

๐Ÿ› Bug Report

Hi. Feel free to close this if I'm missing something simple or I'm just misinformed on the scope of this project. But I typically run parcel as a global install. It took me a while to figure out why I couldn't get this plugin to work properly. I finally stumbled across a sample repo and discovered the fact that parcel itself has to be installed locally.

๐Ÿ’ป Code Sample

https://github.com/antony/svelte-seed
^try cloning this and doing npm run dev. Note that it works. Now try doing npm remove parcel-bundler and running it (assuming you have parcel installed globally). It results in the following error:

๐Ÿšจ  svelte-seed/src/main.js:1:16: Cannot resolve dependency './components/app/component.svelte' at /dev/testing/svelte-seed/src/components/app/component.svelte'
> 1 | import App from './components/app/component.svelte'
    |                ^
  2 | 
  3 | const app = new App({
  4 |   target: document.body,

Nothing else has changed other than where parcel is being invoked from (i.e. the component path is still correct despite saying it can't be resolved). I suspect this is not expected behavior but looking for some input.

๐ŸŒ Your Environment

OSX 10.14.3
Node 11.3.0
Parcel 1.11.0
Parcel-plugin-svelte: 2.1.0-alpha-0
Svelte 2.15.3

svelte-3-example doesn't work

๐Ÿ› Bug Report

The included svelte-3-example directory doesn't work for me. I downloaded it, did npm install, then npm run start and I get these errors in the browser:

image

๐ŸŽ› Configuration (.svelterc, package.json, cli command)

I'm not using any custom config.

๐Ÿ’ป Code Sample

The code is directly from the svelte-3-example directory

๐ŸŒ Your Environment

"parcel-plugin-svelte": "^3.0.0",
"svelte": "^3.0.0"

Project will not run without installing Svelte as a dependency

๐Ÿ› Bug Report

When I go to run the project after installing all the dev dependencies, and creating all the files from the README.MD when I go to run the project with Yarn here is the error I get.

Parser "parcel-plugin-svelte/lib/svelte-asset.js" failed to initialize when processing asset "App.svelte". Threw the following error:
Error: Cannot find module 'svelte/compiler.js'
Require stack:
- /home/peter/svelte-app/node_modules/parcel-plugin-svelte/lib/svelte-asset.js
- /home/peter/svelte-app/node_modules/parcel-bundler/src/Parser.js
- /home/peter/svelte-app/node_modules/parcel-bundler/src/Bundler.js
- /home/peter/svelte-app/node_modules/parcel-bundler/index.js
- /home/peter/svelte-app/node_modules/parcel-bundler/src/cli.js
- /home/peter/svelte-app/node_modules/parcel-bundler/bin/cli.js
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:957:15)
    at Function.Module._load (internal/modules/cjs/loader.js:840:27)
    at Module.require (internal/modules/cjs/loader.js:1019:19)
    at require (/home/peter/svelte-app/node_modules/v8-compile-cache/v8-compile-cache.js:161:20)
    at Object.<anonymous> (/home/peter/svelte-app/node_modules/parcel-plugin-svelte/lib/svelte-asset.js:2:33)
    at Module._compile (/home/peter/svelte-app/node_modules/v8-compile-cache/v8-compile-cache.js:194:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1153:10)
    at Module.load (internal/modules/cjs/loader.js:977:32)
    at Function.Module._load (internal/modules/cjs/loader.js:877:14)
    at Module.require (internal/modules/cjs/loader.js:1019:19) falling back to RawAsset
โš ๏ธ  Parser "parcel-plugin-svelte/lib/svelte-asset.js" failed to initialize when processing asset "App.svelte". Threw the following error:
Error: Cannot find module 'svelte/compiler.js'
Require stack:
- /home/peter/svelte-app/node_modules/parcel-plugin-svelte/lib/svelte-asset.js
- /home/peter/svelte-app/node_modules/parcel-bundler/src/Parser.js
- /home/peter/svelte-app/node_modules/parcel-bundler/src/Bundler.js
- /home/peter/svelte-app/node_modules/parcel-bundler/index.js
- /home/peter/svelte-app/node_modules/parcel-bundler/src/cli.js
- /home/peter/svelte-app/node_modules/parcel-bundler/bin/cli.js
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:957:15)
    at Function.Module._load (internal/modules/cjs/loader.js:840:27)
    at Module.require (internal/modules/cjs/loader.js:1019:19)
    at require (/home/peter/svelte-app/node_modules/v8-compile-cache/v8-compile-cache.js:161:20)
    at Object.<anonymous> (/home/peter/svelte-app/node_modules/parcel-plugin-svelte/lib/svelte-asset.js:2:33)
    at Module._compile (/home/peter/svelte-app/node_modules/v8-compile-cache/v8-compile-cache.js:194:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1153:10)
    at Module.load (internal/modules/cjs/loader.js:977:32)
    at Function.Module._load (internal/modules/cjs/loader.js:877:14)
    at Module.require (internal/modules/cjs/loader.js:1019:19) falling back to RawAsset
โš ๏ธ  Parser "parcel-plugin-svelte/lib/svelte-asset.js" failed to initialize when processing asset "App.svelte". Threw the following error:
Error: Cannot find module 'svelte/compiler.js'
Require stack:
- /home/peter/svelte-app/node_modules/parcel-plugin-svelte/lib/svelte-asset.js
- /home/peter/svelte-app/node_modules/parcel-bundler/src/Parser.js
- /home/peter/svelte-app/node_modules/parcel-bundler/src/Pipeline.js
- /home/peter/svelte-app/node_modules/parcel-bundler/src/worker.js
- /home/peter/svelte-app/node_modules/@parcel/workers/src/child.js
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:957:15)
    at Function.Module._load (internal/modules/cjs/loader.js:840:27)
    at Module.require (internal/modules/cjs/loader.js:1019:19)
    at require (/home/peter/svelte-app/node_modules/v8-compile-cache/v8-compile-cache.js:161:20)
    at Object.<anonymous> (/home/peter/svelte-app/node_modules/parcel-plugin-svelte/lib/svelte-asset.js:2:33)
    at Module._compile (/home/peter/svelte-app/node_modules/v8-compile-cache/v8-compile-cache.js:194:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1153:10)
    at Module.load (internal/modules/cjs/loader.js:977:32)
    at Function.Module._load (internal/modules/cjs/loader.js:877:14)
    at Module.require (internal/modules/cjs/loader.js:1019:19) falling back to RawAsset

๐ŸŽ› Configuration (.svelterc, package.json, cli command)

Here's my package.json file with its settings. The other files index.html and main.js are just copied from the README file.

{
  "name": "svelte-app",
  "version": "1.0.0",
  "description": "A Svelte App",
  "main": "index.js",
  "author": "Peter Cruckshank",
  "license": "MIT",
  "private": false,
  "devDependencies": {
    "@babel/polyfill": "^7.8.7",
    "parcel-bundler": "^1.12.4",
    "parcel-plugin-svelte": "^4.0.6"
  },
  "scripts": {
    "start": "parcel ./index.html",
    "build": "parcel build index.html"
  }
}

๐Ÿ’ป Code Sample

All the code is the boilerplate from the README.MD file .

๐ŸŒ Your Environment

Parcel version 1.12.4
Svelte: ????
I do not have Svelte installed as a global dependency, so that's probably why the build fails. But the README does not say that you have to install Svelte globally. Even if I install Svelte globablly, the project still does not compile.

Be able to use different config for development vs production

๐Ÿ™‹ Feature Request

Detailed description

As of version 4.0.3 the compiler options are correctly being sent to svelte. However, I want to run with different config in development vs production. The main use case I have for this is the CSS - I want it to be inline in development (i.e. css: true) but output to a separate file when building for production (css: false). I can imagine that there might be more options I'd want to include in that in the future though.

I don't know how to accomplish this right now without modifying the config back and forth each time I want to develop and then deploy.

I think there are two main ways this could be done. And I'm ambivalent about which is better. Simply having the ability is the important part.

Option 1: Be able to specify an overriding config on the command line, e.g. parcel build --config prod.json

Option 2: Having a predetermined separate config object. e.g:

svelte: {
  compiler: {css: false},
  devCompiler: {css: true}
}

Possible work-around?

I don't know of any way to change this without manually modifying the config at this point. I would love help figuring out a work around if one is possible.

Path issues on windows

๐Ÿ› Bug Report

These lines

const hotApiRequire = path.relative(path.dirname(asset.name), require.resolve('./hot-api'));
const replacement = `
if (module.hot) {
const { configure, register, reload } = require('${hotApiRequire}');

output a string with \ in it on windows, which leads to errors like this from Parcel.

C:\Users\Patrick\Documents\Code\svelte-xstate>npm start

> [email protected] start C:\Users\Patrick\Documents\Code\svelte-xstate
> parcel src/index.html --no-hmr

Server running at http://localhost:1234
ร—  C:\Users\Patrick\Documents\Code\svelte-xstate\src\app.svelte:221:54: Cannot resolve dependency '..
ode_modulesparcel-plugin-sveltesrchot-api.js' at 'C:\Users\Patrick\Documents\Code\svelte-xstate\src\..
ode_modulesparcel-plugin-sveltesrchot-api.js' at 'C:\Users\Patrick\Documents\Code\svelte-xstate\src\..
ode_modulesparcel-plugin-sveltesrchot-api.js'
    at Resolver.resolve (C:\Users\Patrick\Documents\Code\svelte-xstate\node_modules\parcel-bundler\src\Resolver.js:70:17)
    at <anonymous>

Note how node_modules\parcel-plugin\svelte\src\hot-api.js became ode_modulesparcel-plugin-sveltesrchot-api.js because it used window-style slashes instead of *nix-style slashes.

Running the path from line 7 through something like slash is probably worthwhile. I wasn't able to get this working on Windows despite passing --no-hmr so I'm unable to use this plugin currently.

๐Ÿ’ป Code Sample

Use the example in the repo

๐ŸŒ Your Environment

"devDependencies": {
    "parcel-bundler": "^1.9.2",
    "parcel-plugin-svelte": "^1.2.1",
    "svelte": "^2.7.2"
  },

npm @6.1.0
[email protected]

Running on Windows 10

Cannot resolve dependency

I can't get this plugin working with parcel. When I build I get Cannot resolve dependency.
I've created a sample repository here.

Does not watch for imported scripts and styles

๐Ÿ› Bug Report

Does not update when I change the the script.ts or style.scss files. Updates them if I also unnecessarily import those files inside the index.html file.

๐ŸŽ› Configuration (.svelterc, package.json, cli command)

Windows WSL
cli: rm -rf dist && parcel src/index.html

\\ index.ts
import Svelte from './index.svelte';
new Svelte({
	target: document.body
});
<!-- index.html -->
<html lang="en">
	<head>
		<title>Go go go! Go A no go B!</title>
		<link rel="stylesheet" href="style.scss">
	</head>
	<body>

	<script src="index.ts"></script>
	</body>
</html>
// index.svelte
<style lang="scss" global>
	@import './style.scss';
</style>

<script lang="ts" src="script.ts">
</script>

package.json:

    "parcel-bundler": "^1.12.4",
    "parcel-plugin-svelte": "^4.0.5",
    "postcss-modules": "^1.4.1",
    "svelte": "^3.16.5",
    "svelte-preprocess": "^3.3.0"

Svelte v3 support

๐Ÿ™‹ Feature Request

Detailed description

Support the upcoming Svelte v3 syntax!

I've done the initial work here: #35 but am encountering an issue.

Placing this github feature request here for tracking purposes.

Not reading built in node modules example (fs)

Node ver 10.16.3
Svelte ver 13.17.1
parcel-plugin-svelte ver 4.0.5

import fs from 'fs';
 fs.open('/dir/some', 'wx', function(err, data){
...code
}

I get this error

TypeError: _fs.default.open is not a function

Broken hot reload when using workaround for #44

๐Ÿ› Workaround Report for #44

Like issue #44, I got the Class constructor SvelteComponent cannot be invoked without 'new' error; applying the workaround mentioned for a modern browser via browserslist:

"browserslist": [
    "edge >= 13"
  ]

gets things working in parcel, but as comment on #44 mentions, it completely breaks HMR.

Looking at svelte-asset.js I found that if you stop calling makeHot, then the browser refreshes as normal.

i.e. remove these lines:

if (process.env.NODE_ENV !== 'production' && this.options.hmr) {
code = makeHot(compilerOptions.filename, code, this);
}

And then modifying a svelte file does refresh the browser.

๐ŸŒ Your Environment

  • Windows OS
  • parcel-bundler: 1.12.3
  • svelte: 3.4.2

Example for using Typescript with parcel-plugin-svelte?

Hi,

I tried to use Typescript in my Svelte project thats based on the parcel plugin for svelte. Yet I could not figure out how I have to configure the preprocessing for Typescript. Does anyone have a working example for me?

Thanks a lot,
Jan

Support svelte.preprocess

Hi there,

since V1.44.0, svelte supports a preprocessing step, e.g. to render scss if used. The API is documented here.

Just an example of what this might look like resp. result in:

const { compile, preprocess } = require('svelte');
const JSAsset = require('parcel-bundler/src/assets/JSAsset');

class SvelteAsset extends JSAsset {
  async parse(code) {
    // preprocess does not do that much
    const preprocessed = await preprocess(code, preprocessOptions);
    const { generatedCode, map, css, cssMap, ast } = compile(preprocessed.toString(), compilerOptions);
    // The other stuff might be useful for different things...

    this.contents = generatedCode;

    return super.parse(this.contents);
  }
}

module.exports = SvelteAsset;

(extracted from the svelte-loader behavior)
Supporting this would require to use an external config file that is not in JSON format, since preprocessing requires functions. Maybe something like a .svelte.config.js ? It might be possible to put the general svelte options there as well and only pick the current definition in case the file is absent.

E.g. - .svelte.config.js:

const compilerOptions = { /* compiler options as defined in docs */ };
const preprocessOptions = { /* Preprocess options as defined in docs */ };
module.exports = { compilerOptions, preprocessOptions };

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.