success i think?

This commit is contained in:
Rich Harris
2018-08-29 17:37:20 -04:00
parent 86dee17040
commit bb737eeb32
7 changed files with 7 additions and 13 deletions

1
config/rollup.js Normal file
View File

@@ -0,0 +1 @@
module.exports = require('../dist/rollup.js');

1
config/webpack.js Normal file
View File

@@ -0,0 +1 @@
module.exports = require('../dist/webpack.js');

View File

@@ -1,3 +0,0 @@
console.log(`please tell me windows isn't trying to run this file`);
module.exports = require('./dist/rollup.js');

View File

@@ -70,7 +70,7 @@
"scripts": {
"cy:open": "cypress open",
"test": "mocha --opts mocha.opts",
"pretest": "npm run build && echo \"seriously, wtf\" && ls . && ls dist",
"pretest": "npm run build",
"build": "rm -rf dist && rollup -c",
"dev": "rollup -cw",
"prepublishOnly": "npm test",

View File

@@ -1,4 +1,3 @@
import path from 'path';
import typescript from 'rollup-plugin-typescript';
import string from 'rollup-plugin-string';
import json from 'rollup-plugin-json';
@@ -6,8 +5,6 @@ import resolve from 'rollup-plugin-node-resolve';
import commonjs from 'rollup-plugin-commonjs';
import pkg from './package.json';
console.log('WE ARE INSIDE THE ROLLUP CONFIG');
const external = [].concat(
Object.keys(pkg.dependencies),
Object.keys(process.binding('natives')),
@@ -18,7 +15,7 @@ export default [
{
input: `src/runtime/index.ts`,
output: {
file: `./runtime.js`,
file: `runtime.js`,
format: 'es'
},
plugins: [
@@ -39,7 +36,7 @@ export default [
`src/webpack.ts`
],
output: {
dir: './dist',
dir: 'dist',
format: 'cjs',
sourcemap: true
},

View File

@@ -1,2 +1 @@
// TODO write to this file, instead of webpack.js
module.exports = require('./dist/webpack.js');
throw new Error(`As of Sapper 0.18, webpack config must be loaded from sapper/config/webpack.js`);

View File

@@ -1,2 +1 @@
// TODO deprecate this file in favour of sapper/webpack.js
module.exports = require('../dist/webpack.js');
throw new Error(`As of Sapper 0.18, webpack config must be loaded from sapper/config/webpack.js`);