Comments (6)
There was another problem when I run yarn build
, so i change mount: { public: { url: path.posix.join('/', config.baseHref), static: true }, 'src/renderer': path.posix.join('/', config.rendererBaseHref), },
replace const path = require('path').posix;
from electron-snowpack.
The last question, is there any plan to provide a vue3 template.
from electron-snowpack.
Could you run with --verbose
mode and provide the output? I haven't touched Windows dev environments in ages, this would help me to get what's happening different on Unix systems.
Rergards vue - sure I'll add that later.
from electron-snowpack.
For now, you can probably surpass the error with, a hardcoded snopack.cofnig.js
value:
{
mount: {
public: {url: '/', static: true},
'src/renderer': {url: '/dist'},
},
}
from electron-snowpack.
when i change snopack.cofnig.js
and run yarn dev --verbose
the output is
`[snowpack] loaded plugin: C:\Users\Administrator\Desktop\hello-world\node_modules@snowpack\plugin-dotenv\plugin.js
[electron-snowpack] Starting Snowpack server with config: {
"root": "C:\Users\Administrator\Desktop\hello-world",
"plugins": [
{
"name": "@snowpack/plugin-dotenv"
},
{
"name": "@snowpack/plugin-esbuild",
"resolve": {
"input": [
".mjs",
".jsx",
".ts",
".tsx"
],
"output": [
".js"
]
}
}
],
"alias": {},
"exclude": [
"/node_modules//",
"C:\Users\Administrator\Desktop\hello-world\dist\renderer/**/"
],
"routes": [],
"devOptions": {
"secure": false,
"hostname": "localhost",
"port": 9510,
"open": "none",
"output": "stream",
"hmrDelay": 0,
"hmrErrorOverlay": true
},
"buildOptions": {
"out": "C:\Users\Administrator\Desktop\hello-world\dist\renderer",
"baseUrl": "/",
"metaUrlPath": "/_snowpack",
"clean": true,
"sourcemap": false,
"watch": false,
"htmlFragments": false,
"ssr": false
},
"testOptions": {
"files": [
"tests//*",
"/.@(spec|test)."
]
},
"packageOptions": {
"source": "local",
"external": [
"assert",
"async_hooks",
"buffer",
"child_process",
"cluster",
"console",
"constants",
"crypto",
"dgram",
"dns",
"domain",
"events",
"fs",
"http",
"http2",
"https",
"inspector",
"module",
"net",
"os",
"path",
"perf_hooks",
"punycode",
"querystring",
"readline",
"repl",
"stream",
"string_decoder",
"timers",
"tls",
"trace_events",
"tty",
"url",
"util",
"v8",
"vm",
"worker_threads",
"zlib",
"electron"
],
"packageLookupFields": [],
"knownEntrypoints": [],
"rollup": {
"plugins": []
}
},
"mount": {
"C:\Users\Administrator\Desktop\hello-world\public": {
"url": "/",
"static": true,
"resolve": true
},
"C:\Users\Administrator\Desktop\hello-world\src\renderer": {
"url": "/dist",
"static": false,
"resolve": true
}
},
"extends": "electron-snowpack/config/snowpack.js",
"_extensionMap": {
".mjs": [
".js"
],
".jsx": [
".js"
],
".ts": [
".js"
],
".tsx": [
".js"
]
}
}
[electron-snowpack] Starting esbuild build with config: {
"platform": "node",
"format": "cjs",
"entryPoints": [
"src/main/index.js"
],
"outdir": "dist\main",
"define": {
"process.env.NODE_ENV": ""development"",
"process.env.MODE": ""development"",
"process.env.SNOWPACK_PORT": ""9510"",
"process.env.SNOWPACK_PUBLIC_BASE_HREF": ""."",
"process.env.SNOWPACK_PUBLIC_RENDERER_BASE_HREF": ""dist""
},
"logLevel": "info"
}
[snowpack] Using in-memory cache.
[snowpack] Mounting directories:
[snowpack] -> 'C:\Users\Administrator\Desktop\hello-world\public' as URL '/'
[snowpack] -> 'C:\Users\Administrator\Desktop\hello-world\src\renderer' as URL '/dist'
[snowpack] Using cache folder: node_modules.cache\snowpack\development
[snowpack] Cache out of date or missing. Updating...
[snowpack] Skip scanning public\electron-snowpack.svg for imports (unknown file extension .svg)
[snowpack] Scanning public\index.html for imports as HTML
[snowpack] Scanning src\renderer\common\lang.min.js for imports as JS
[snowpack] Scanning src\renderer\common\quasar.umd.js for imports as JS
[snowpack] Scanning src\renderer\common\svg.min.js for imports as JS
[snowpack] Scanning src\renderer\index.css for imports as CSS
[snowpack] Scanning src\renderer\index.js for imports as JS
[snowpack] Scanning src\renderer\style\font_icon.css for imports as CSS
[snowpack] Scanning src\renderer\style\quasar.css for imports as CSS
[snowpack] Nothing to install.
http://localhost:9510 • http://10.0.200.79:9510
Server started in 76ms.
[electron-snowpack] Starting an electron process with arguments: ["dist\main\index.js"]
[electron]
[electron] (node:12764) electron: The default of contextIsolation is deprecated and will be changing from false to true in a future release of Electron. See electron/electron#23506 for more information
[snowpack] [200] GET /index.html
[snowpack] [200] GET /_snowpack/hmr-client.js
[snowpack] [200] GET /_snowpack/hmr-error-overlay.js
[snowpack] [200] GET /electron-snowpack.svg
[snowpack] [200] GET /dist/index.css
[snowpack] [200] GET /dist/index.js
[snowpack] optimized etag! sending 304...
[snowpack] [304] GET /dist/index.css`
from electron-snowpack.
Issues should be fixed, try the latest version. Also added the vue example.
from electron-snowpack.
Related Issues (20)
- Preload script and forked scripts do not work in production HOT 2
- TypeScript typings
- Alias options are not supported HOT 1
- Is it possible to change snowpackPort HOT 1
- A few suggestions HOT 1
- "npm run dev" works in examples, but not "npm run dist" HOT 2
- src/renderer/* -> HMR/Refresh HOT 7
- Examples have missing npm-run-all dev dependency HOT 4
- Native Node Modules HOT 5
- DevTools was disconnected from the page. Once page is reloaded, DevTools will automatically reconnect. HOT 1
- Need to add the way to pass additional esbuild config HOT 3
- Feature: multiple preload scripts HOT 3
- Handle dynamic/destructured .dotenv variable access in main HOT 4
- Relative import plugin broken for Windows and when bundle/minification optimizations are added HOT 5
- Using Preload scripts with typescript + react HOT 6
- Using sqlite3 with react and typescript HOT 1
- I get empty windows for the examples built with electron-builder on Windows 10 HOT 4
- Set sourcemap option in dev esbuild configuration HOT 3
- Cannot use supabase package on my project ? HOT 2
- Support for koffi or node-ffi HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from electron-snowpack.