Skip to content

Commit

Permalink
fix(rollup): Fix the path to rollup-plugin-commonjs
Browse files Browse the repository at this point in the history
  • Loading branch information
pyoner committed Jul 4, 2020
1 parent d3c6f66 commit 05efab5
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 28 deletions.
2 changes: 1 addition & 1 deletion packages/common/rollup.config.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import resolve from "@rollup/plugin-node-resolve";
import commonjs from "@rollup/plugin-commonjs";
import commonjs from "rollup-plugin-commonjs";
import sourceMaps from "rollup-plugin-sourcemaps";
import camelCase from "lodash.camelcase";
import typescript from "@wessberg/rollup-plugin-ts";
Expand Down
52 changes: 26 additions & 26 deletions packages/lib/rollup.config.ts
Original file line number Diff line number Diff line change
@@ -1,42 +1,42 @@
import resolve from '@rollup/plugin-node-resolve'
import commonjs from '@rollup/plugin-commonjs'
import json from '@rollup/plugin-json'
import resolve from "@rollup/plugin-node-resolve";
import commonjs from "rollup-plugin-commonjs";
import json from "@rollup/plugin-json";

import sourceMaps from 'rollup-plugin-sourcemaps'
import typescript from '@wessberg/rollup-plugin-ts'
import sourceMaps from "rollup-plugin-sourcemaps";
import typescript from "@wessberg/rollup-plugin-ts";

import camelCase from 'camelcase'
import camelCase from "camelcase";

import analyze from 'rollup-plugin-analyzer'
import svelte from 'rollup-plugin-svelte'
import { preprocess, createEnv, readConfigFile } from '@pyoner/svelte-ts-preprocess'
import analyze from "rollup-plugin-analyzer";
import svelte from "rollup-plugin-svelte";
import { preprocess, createEnv, readConfigFile } from "@pyoner/svelte-ts-preprocess";

const production = !process.env.ROLLUP_WATCH
const production = !process.env.ROLLUP_WATCH;

const env = createEnv()
const compilerOptions = readConfigFile(env)
const env = createEnv();
const compilerOptions = readConfigFile(env);
const opts = {
env,
compilerOptions: {
...compilerOptions,
allowNonTsExtensions: true
}
}
allowNonTsExtensions: true,
},
};

const pkg = require('./package.json')
const pkg = require("./package.json");

const libraryName = 'svelte-form'
const libraryName = "svelte-form";

export default {
input: `src/index.ts`,
output: [
{ file: pkg.main, name: camelCase(libraryName), format: 'umd', sourcemap: true },
{ file: pkg.module, format: 'es', sourcemap: true }
{ file: pkg.main, name: camelCase(libraryName), format: "umd", sourcemap: true },
{ file: pkg.module, format: "es", sourcemap: true },
],
// Indicate here external modules you don't wanna include in your bundle (i.e.: 'lodash')
external: [],
watch: {
include: 'src/**'
include: "src/**",
},
plugins: [
analyze({ summaryOnly: true }),
Expand All @@ -45,10 +45,10 @@ export default {
dev: !production,
// we'll extract any component CSS out into
// a separate file — better for performance
css: css => {
css.write('public/bundle.css')
css: (css) => {
css.write("public/bundle.css");
},
preprocess: preprocess(opts)
preprocess: preprocess(opts),
}),
// Allow json resolution
json(),
Expand All @@ -62,6 +62,6 @@ export default {
typescript(),

// Resolve source maps to the original source
sourceMaps()
]
}
sourceMaps(),
],
};
2 changes: 1 addition & 1 deletion packages/validators/ajv/rollup.config.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import resolve from "@rollup/plugin-node-resolve";
import commonjs from "@rollup/plugin-commonjs";
import commonjs from "rollup-plugin-commonjs";
import sourceMaps from "rollup-plugin-sourcemaps";
import camelCase from "lodash.camelcase";
import typescript from "@wessberg/rollup-plugin-ts";
Expand Down

0 comments on commit 05efab5

Please sign in to comment.