Giter Site home page Giter Site logo

Comments (8)

infusion avatar infusion commented on May 27, 2024

Hi James,
locally I work on a new export pattern, which allows all my node modules to work with webpack, typescript, AMD/UMD, ... I need to finish this work and bring it to the modules. If you know a quick fix to keep you running, let me know.

from bitset.js.

jamesjryan avatar jamesjryan commented on May 27, 2024

Robert,

Thanks so much for the prompt reply, that's great to hear.

I'm working on something today that requires bitset, and it works locally with imports but the build fails.

If you could publish a working copy that works with webpack on a separate branch, or even just a gist so I could include it as vendor code outside of node_modules that'd be fantastic.

from bitset.js.

infusion avatar infusion commented on May 27, 2024

From the code site, what changes are required? Export the module in ES6 style?

from bitset.js.

jamesjryan avatar jamesjryan commented on May 27, 2024

Exporting as ES5 style, npm modules as ES6 still tends to cause issues with build systems.

from bitset.js.

infusion avatar infusion commented on May 27, 2024

bitset.js is getting exported with ES5. What is your actual error?

from bitset.js.

jamesjryan avatar jamesjryan commented on May 27, 2024

tsconfig.json:

{
  "compilerOptions": {
    "baseUrl": "src",
    "outDir": "build/dist",
    "module": "es6",
    "target": "es5",
    "lib": ["es6", "dom"],
    "sourceMap": true,
    "allowJs": true,
    "jsx": "react",
    "moduleResolution": "node",
    "rootDir": "src",
    "forceConsistentCasingInFileNames": true,
    "noImplicitReturns": true,
    "noImplicitThis": true,
    "strictNullChecks": true,
    "suppressImplicitAnyIndexErrors": true,
    "noUnusedLocals": true,
    "allowSyntheticDefaultImports": true
  },
  "include": [
    "src/**/*"
  ],
  "exclude": [
    "node_modules",
    "build",
    "scripts",
    "acceptance-tests",
    "webpack",
    "jest",
    "src/*.test.tsx",
    "src/setupTests.ts"
  ],
  "types": [
    "typePatches"
  ]
}

error:

 npm run build

> [email protected] build /Users/xxxxx/Data/code/xxxxxx/client
> react-scripts-ts build

Creating an optimized production build...
Starting type checking and linting service...
Using 1 worker with 2048MB memory limit
ts-loader: Using [email protected] and /Users/xxxxx/Data/code/xxxxx/client/tsconfig.json
No valid rules have been specified
Failed to compile.

Failed to minify the code from this file:

        ./node_modules/bitset/bitset.js:50

Read more here: http://bit.ly/2tRViJ9

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] build: `react-scripts-ts build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

from bitset.js.

infusion avatar infusion commented on May 27, 2024

Could you please try to configure bitset.js to be ignored by the minimizer of webpack?

from bitset.js.

infusion avatar infusion commented on May 27, 2024

Please test the latest version and if it still fails, add bitset to the ignore list of babel/minimizer and use the minified file directly.

from bitset.js.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.