Update npm packages
This commit is contained in:
@@ -8,8 +8,8 @@ import svelte from 'rollup-plugin-svelte'
|
||||
import autoPreprocess from 'svelte-preprocess'
|
||||
import { terser } from 'rollup-plugin-terser'
|
||||
import glslify from 'rollup-plugin-glslify'
|
||||
import sapperConfig from 'sapper/config/rollup'
|
||||
import { config } from 'dotenv'
|
||||
import config from 'sapper/config/rollup'
|
||||
import { config as dotenv } from 'dotenv'
|
||||
import pkg from './package.json'
|
||||
|
||||
// Define environment and things
|
||||
@@ -18,7 +18,7 @@ const dev = mode === 'development'
|
||||
const legacy = !!process.env.SAPPER_LEGACY_BUILD
|
||||
const replaceOptions = {
|
||||
'process.env.NODE_ENV': JSON.stringify(mode),
|
||||
'process.env.CONFIG': JSON.stringify(config().parsed)
|
||||
'process.env.CONFIG': JSON.stringify(dotenv().parsed)
|
||||
}
|
||||
|
||||
// Svelte
|
||||
@@ -53,8 +53,8 @@ export default {
|
||||
** Client
|
||||
*/
|
||||
client: {
|
||||
input: sapperConfig.client.input(),
|
||||
output: sapperConfig.client.output(),
|
||||
input: config.client.input(),
|
||||
output: config.client.output(),
|
||||
plugins: [
|
||||
// Javascript
|
||||
replace({
|
||||
@@ -62,11 +62,12 @@ export default {
|
||||
...replaceOptions
|
||||
}),
|
||||
svelte({
|
||||
dev,
|
||||
preprocess,
|
||||
hydratable: true,
|
||||
emitCss: dev,
|
||||
css: css => css.write('static/bundle.css')
|
||||
emitCss: true,
|
||||
compilerOptions: {
|
||||
dev,
|
||||
hydratable: true,
|
||||
}
|
||||
}),
|
||||
aliases,
|
||||
glslify(),
|
||||
@@ -96,18 +97,21 @@ export default {
|
||||
** Server
|
||||
*/
|
||||
server: {
|
||||
input: sapperConfig.server.input(),
|
||||
output: sapperConfig.server.output(),
|
||||
input: config.server.input(),
|
||||
output: config.server.output(),
|
||||
plugins: [
|
||||
replace({
|
||||
'process.browser': false,
|
||||
...replaceOptions
|
||||
}),
|
||||
svelte({
|
||||
generate: 'ssr',
|
||||
hydratable: true,
|
||||
dev,
|
||||
preprocess
|
||||
preprocess,
|
||||
emitCss: false,
|
||||
compilerOptions: {
|
||||
generate: 'ssr',
|
||||
hydratable: true,
|
||||
dev,
|
||||
}
|
||||
}),
|
||||
aliases,
|
||||
glslify(),
|
||||
@@ -128,8 +132,8 @@ export default {
|
||||
*/
|
||||
// ...(!dev && {
|
||||
// serviceworker: {
|
||||
// input: sapperConfig.serviceworker.input(),
|
||||
// output: sapperConfig.serviceworker.output(),
|
||||
// input: config.serviceworker.input(),
|
||||
// output: config.serviceworker.output(),
|
||||
// plugins: [
|
||||
// resolve(),
|
||||
// replace({
|
||||
|
||||
Reference in New Issue
Block a user