refactor(web): use snowpack-plugin-hash

This commit is contained in:
Paul Armstrong 2021-02-05 08:07:24 -08:00 committed by Blake Blackshear
parent d51e9446ff
commit a99f360a64
3 changed files with 406 additions and 6527 deletions

6911
web/package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -4,12 +4,11 @@
"scripts": {
"start": "cross-env SNOWPACK_PUBLIC_API_HOST=http://localhost:5000 snowpack dev",
"prebuild": "rimraf build",
"build": "snowpack build"
"build": "cross-env NODE_ENV=production snowpack build"
},
"dependencies": {
"@prefresh/snowpack": "^3.0.1",
"@snowpack/plugin-postcss": "^1.1.0",
"@snowpack/plugin-webpack": "^2.3.0",
"autoprefixer": "^10.2.1",
"cross-env": "^7.0.3",
"immer": "^8.0.1",
@ -19,6 +18,7 @@
"preact-router": "^3.2.1",
"rimraf": "^3.0.2",
"snowpack": "^3.0.11",
"snowpack-plugin-hash": "^0.14.2",
"tailwindcss": "^2.0.2"
}
}

View File

@ -5,21 +5,17 @@ module.exports = {
public: { url: '/', static: true },
src: { url: '/dist' },
},
plugins: [
'@snowpack/plugin-postcss',
'@prefresh/snowpack',
[
'@snowpack/plugin-webpack',
{
sourceMap: true,
},
],
],
plugins: ['@snowpack/plugin-postcss', '@prefresh/snowpack', 'snowpack-plugin-hash'],
routes: [{ match: 'routes', src: '.*', dest: '/index.html' }],
optimize: {
bundle: true,
minify: true,
treeshake: true,
},
packageOptions: {
sourcemap: false,
},
buildOptions: {
sourcemap: true,
sourcemap: false,
},
};